hi, no, your code does not delay the trade. try this one:
trendB =iCustom(NULL, Timeperiod[TimeperiodSelector], "_InsTrend",1,1); trendB.old =iCustom(NULL, Timeperiod[TimeperiodSelector], "_InsTrend",1,2); trendA =iCustom(NULL, Timeperiod[TimeperiodSelector], "_InsTrend",0,1); trendA.old =iCustom(NULL, Timeperiod[TimeperiodSelector], "_InsTrend",0,2);
Or how about taking a time stamp and using iBarshift? That way you can delay by as many bars as you like...
hth
V
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm looking for a code thats will wait to buy after crossing.
Insted of buying exatly wail crossing i want it to buy to or 3 candels later.
I have this code now:
if(trendB>trendA && trendB.old<=trendA.old){
This should Delay it one candle Right? but it wont :(