If I am writing a back test code based on 5 min candle of a particular scrip,
how to refer to the
- previous day close (different time frame than the back test candle time frame)
for eg: how to code the present 5 min candle close is higher than previous day close
- the high so far that has occurred in a particular day in focus
for eg: how to code the condition: the highest high so far for that day - present 5 min candles close is greater than x Rs
As per the above condition it can not be coded with different time frame in tradescript
Ok. Thanks, that answers is for my 1st question. Is this challenge (addressing different time frames while coding) foreseen to be solved in the future versions of Trade script /Pi?
What about my second question - is it not possible to find the highest high so far with the 5 min candle chart in that particular day?
you can use HHV(14) and calculate and give the value based on number candles