I had a strategy working on daily bars and I am trying to convert it so that it works on 15 minutes bar at 3.45 pm.
However the following line of code is not working:
if (CrossAbove(MACD(macdfastactual, macdslowactual, macdsmoothactual), MACD(macdfastactual, macdslowactual, macdsmoothactual).Avg,macdlookbackactual) && ToTime(Time[0]) == 154500 ) { EnterLong(1,"Buy MACD Crossover"); }
private int macdfast=12; private int macdslow=26; private int macdsmooth=9; private int macdlookback=3;
int macdfastactual=macdfast*periodsperday; int macdslowactual=macdslow*periodsperday; int macdsmoothactual=macdsmooth*periodsperday; int macdlookbackactual=macdlookback*periodsperday;
Comment