I'm not able to figure this out, so maybe someone can help me. Please have a look at the attached picture.
Now in my opinion the following values should be printed to the output window.
18.00
Bars since entry = 0
Lowest bar since entering trade = 0
Lowest price since entering trade = 1,0968
19.00
Bars since entry = 1
Lowest bar since entering trade = 1
Lowest price since entering trade = 1,0968
20.00
Bars since entry = 2
Lowest bar since entering trade = 2
Lowest price since entering trade = 1,0968
21.00
Etc.
However, the output window print the following:
25-7-2016 18:00:00 BarsSinceEntry() = 0
25-7-2016 18:00:00 LowestBar(Low,BarsSinceEntry() = 0
25-7-2016 18:00:00 Low[LowestBar(Low,BarsSinceEntry()] = 1,0968
25-7-2016 19:00:00 BarsSinceEntry() = 1
25-7-2016 19:00:00 LowestBar(Low,BarsSinceEntry() = 0
25-7-2016 19:00:00 Low[LowestBar(Low,BarsSinceEntry()] = 1,0977
25-7-2016 20:00:00 BarsSinceEntry() = 2
25-7-2016 20:00:00 LowestBar(Low,BarsSinceEntry() = 1
25-7-2016 20:00:00 Low[LowestBar(Low,BarsSinceEntry()] = 1,0977
Where the LowestBar seems to be one lower than supposed to. Does anyone now why this is?
Thanks in advance.
Regards,
Gunnar
Comment