|
|
|
||||
|
Gaz, you can get current bar value:
double r0 = iCustom(Symbol(), Period(), "SuperSR7", SR_Step, SR_Precision, SR_Shift, 300, 0, 0); double s0 = iCustom(Symbol(), Period(), "SuperSR7", SR_Step, SR_Precision, SR_Shift, 300, 1, 0); r0 is current resistance, and s0 is current support To get previous bar: double r1 = iCustom(Symbol(), Period(), "SuperSR7", SR_Step, SR_Precision, SR_Shift, 300, 0, 1); double s1 = iCustom(Symbol(), Period(), "SuperSR7", SR_Step, SR_Precision, SR_Shift, 300, 1, 1); r1 is previous resistance and s1 is previous support. |
|
||||
|
Thanks, I'll check it out sometime soon (maybe this weekend). Hopefully this will help as I know the only reason DLM is failing with S&R is because of its consistent change and false signals
__________________
____________________________\¦/ ___________________________(ò ó) ______________________o0o___(_)___o0o__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ |
|
||||
|
Scorpion, I put the code in there but when I hit compile it didnt recognize the parts SR_Step, SR_Precision, SR_Shift so it didnt want to compile, but if I remove them it wont work...
Any suggestions? Here is the original part of the code to modify: Code:
int OpenOrdersBasedOnSupRes()
{
int myOrderType=3;
double iTmpR=0, iTmpS=0;
iTmpR = iCustom(Symbol(),0,"Support and Resistance",0,0);
iTmpS = iCustom(Symbol(),0,"Support and Resistance",1,0);
if (Close[0]==iTmpS) { myOrderType = 1; }
if (Close[0]==iTmpR) { myOrderType = 2; }
return(myOrderType);
}
Code:
int OpenOrdersBasedOnSupRes()
{
int myOrderType=3;
double iTmpR=0, iTmpS=0;
iTmpR = iCustom(Symbol(),Period(),"SuperSR7",SR_Step,SR_Precision,SR_Shift,300,0,0);
iTmpS = iCustom(Symbol(),Period(),"SuperSR7",SR_Step,SR_Precision,SR_Shift,300,1,0);
if (Close[0]==iTmpS) { myOrderType = 1; }
if (Close[0]==iTmpR) { myOrderType = 2; }
return(myOrderType);
}
I attached the full expert at the bottom of this un-modified
__________________
____________________________\¦/ ___________________________(ò ó) ______________________o0o___(_)___o0o__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ Last edited by gazuz; 10-21-2006 at 08:37 PM. |
|
||||
|
That's because you didn't declare the global variables. Ok, copy below code and paste on the top with other variables.
extern int SR_Step=150; extern int SR_Precision=10; extern int SR_Shift=1; You can then configure these variables in Expert Settings window. |
|
||||
|
Alright I have one last question with the code
it says Code:
if (Close[0]==iTmpS) { myOrderType = 1; }
if (Close[0]==iTmpR) { myOrderType = 2; }
Please let me know whenever you have time
__________________
____________________________\¦/ ___________________________(ò ó) ______________________o0o___(_)___o0o__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ |
|
||||
|
Well that turns it into a scalper which I actually don't mind at all. I know how to make it into the + and - pips though is to change the > and the < into just equal signs. Now whenever the price is over the resistance it keeps buying and whenever under it keeps selling until the price goes back between the support and resistance
__________________
____________________________\¦/ ___________________________(ò ó) ______________________o0o___(_)___o0o__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ |
|
||||
|
no I mean if the price is over the resistance it will keep buying after every cycle of the DLM is over, usually it only does one trade per cross then ti does whatever the DLM has to do.. but here it keeps going until it crosses back into between the support and resistance.
__________________
____________________________\¦/ ___________________________(ò ó) ______________________o0o___(_)___o0o__ ___¦_____¦_____¦_____¦_____¦_____¦_____¦ |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Astro traders... | ttt123 | General Trading Talk | 46 | 06-07-2012 08:13 AM |
| Super Ea | AQUILEZ | Trading Systems | 152 | 03-28-2012 08:22 PM |
| Support and Resistance Expert Advisor | suffic369 | Classified Ads | 3 | 03-12-2010 02:38 PM |
All times are GMT. The time now is 11:52 AM.
Registered members gain free access to online FOREX currency trading tools, foreign exchange software, Metatrader MT4/MT5 expert advisors, MT4 indicators and EAs. Register now


119Likes









Linear Mode

