How do get the candle timestamp in a strategy

I found this really helpful and used it when writing out backtest / live trading to a csv because I want to see the exact timestamp of a candle (typically used for comparison between candles and technical analysis outputs such as RSI, DMI etc).

First thing to do is to always use the strategy update method and not check. The update method has access to way more objects and properties than check. Then the reference is very simple and looks like:

candle.start.toDate();

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *