Please find the below code and here's the problem:
datetime fromDT ="00:00",
int fromBar = iBarShift(NULL, 60, fromDT),
toBar = iBarShift(NULL, 60, toDT),
length = fromBar - toBar + 1,
HHbar = iHighest(NULL,60, MODE_HIGH, length, toBar),
LLbar = iLowest(NULL,60, MODE_LOW, length, toBar);
double HH = iHigh(NULL,60, HHbar),
LL = iLow(NULL,60, LLbar);
the problem is in backtesting HH and LL are returning the open price of the current bar only.
Any help please?
datetime fromDT ="00:00"
Maybe helps you.
To add comments, please log in or register