Hi,
Is it possible to retrieve the OHLC for the Alphathon BBs TYa, USHYa, BNKa, for example to calculate properly the ATR.
Thanks
Regards
Greg
Hi,
Is it possible to retrieve the OHLC for the Alphathon BBs TYa, USHYa, BNKa, for example to calculate properly the ATR.
Thanks
Regards
Greg
Hi Greg,
OHLC on building blocks are not available for this competition. That being said, you can construct your own OHLC values by switching the frequency from daily to weekly using the to.weekly() function. By default, this returns the OHLC decomposition of the week. There is also a to.monthly() function for monthly decomposition (it could be helpful to look at series from different frequencies). As highlighted in a previous post, make sure that the values are correctly indexed (“backwards” i.e. the open high low close correspond to the past week) in order not to introduce a forward bias. The parameter “indexAt” should help you. Check the documentation of the functions for more details. From your computed OHLC, you can then get the ATR.
Alternatively, you can adapt the ATR to be an “average range” by only using close prices and the max to min span over a set past period.
Let me know if this helps or if you need me to elaborate more.
Thanks
Hervé
Hi Hervé,
Many thanks for your reply and it is what I was thinking.
For Daily ATR as you said with the same idea I already reconstructed the HL only with Close prices and for the period Weekly/Monthly, you are right, it will be easier to have OHLC prices after the convertion.
Man thanks.
Greg