How to get the index of first candle of the yesterday

Julian21 2 years ago updated by Андрей Ринас2 (ATAS developer) 2 years ago 1


I need get the high and low of NY sessions of the last 5 days.

In mql4, I get candle index with any specific datetime, what function is similar in ATAS .

My idea is get the first index candle X days ago, and use a FOR cycle to get the highs and low. Is this way correct?

Thanks for your attentions, ideas or corrections

sorry, my english is a little


You can use "IsNewSession(int bar)" method to it.