Hi, I wanted to add the baseline in this TDI EA.
So, to be able to buy, you have to have LP > LS > LB > 50.
I understand how the zero candle for buying LP is > than LS, but how on candle 1 is LP < than LS?
Can anyone explain how to put the baseline and level 50 in this code?
PL0=iCustom(NULL,0,TDI_INDI,4,i); // Green line
PL1=iCustom(NULL,0,TDI_INDI,4,i+1);
SL0=iCustom(NULL,0,TDI_INDI,3,i); // Red line
SL1=iCustom(NULL,0,TDI_INDI,3,i+1);
BL0=iCustom(NULL,0,TDI_INDI,2,i); // Base line
BL1=iCustom(NULL,0,TDI_INDI,2,i+1);
if (PL0>SL0 && PL1<SL1)
return (SIG_UP);
else if (PL0<SL0 && PL1>SL1)
return (SIG_DN);
else
return (SIG_NO);
So, to be able to buy, you have to have LP > LS > LB > 50.
I understand how the zero candle for buying LP is > than LS, but how on candle 1 is LP < than LS?
Can anyone explain how to put the baseline and level 50 in this code?
PL0=iCustom(NULL,0,TDI_INDI,4,i); // Green line
PL1=iCustom(NULL,0,TDI_INDI,4,i+1);
SL0=iCustom(NULL,0,TDI_INDI,3,i); // Red line
SL1=iCustom(NULL,0,TDI_INDI,3,i+1);
BL0=iCustom(NULL,0,TDI_INDI,2,i); // Base line
BL1=iCustom(NULL,0,TDI_INDI,2,i+1);
if (PL0>SL0 && PL1<SL1)
return (SIG_UP);
else if (PL0<SL0 && PL1>SL1)
return (SIG_DN);
else
return (SIG_NO);
Attached File(s)
TDI-RT-Clone.mq4
4 KB
|
194 downloads
xTDI Cross-EA.mq4
15 KB
|
184 downloads