Above coding are working on indicator (means result expected) but I noticed not really work on Probacktest. (Do you have the same issue Or maybe I am wrong?)
Very appreciate if can you share me how do you code it? 🙂
Before giving you another way to retrieve this values, did you add these specific lines into your probacktest code and verify them on chart after have launched a backtest?
1
2
3
graphDclose(1)coloured(255,0,0)//= yesterday close
graphDhigh(0)coloured(0,200,0)//= The highest High of current day
graphDlow(0)coloured(0,200,100)//= The lowest Low of current day
Sorry to insist, but I expect this to work correctly .. that’s why I don’t understand 🙂
I tested with your advice. However, this is what i found out & worth to share here.
The confusing part is on Monday IF your strategy is sensentive to the market changes 🙂
For Mon Dclose(1),
This value is taken from the close price of 00:55:00 on Mon but not last friday. In consequence, Dhigh(0) – Dclose(1) result will not be the same as the one in PRT chart “Prev Day Close”. The correct way to code is “Dhigh(0) – Dclose(2)” (Dclose(2) is the close price of last friday 23:55:00, which is the last candle of friday)
For Tues – Fri,
Dclose(1) is taken from the close price of 00:55:00.We can keep it as “Dhigh(0) – Dclose(1)”.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok