When running a strategy realtime using a Paper Trader broker or Live broker I'm uncertain as to the correct test to implement.
During the backtest of a candlestick chart:
was used to determine when a new bar was created.
For Renko backtesting the new bar test was a bit different:
then in realtime for renko:
should replace the rawtime test.
Running realtime using the Generic Broker Functions, should I still check for getBarState == BARSTATE_NEWBAR or does the getCurrentBarIndex == 0, replace the getBarState() == BARSTATE_NEWBAR test for both bar charts and Renko charts?
What is the relationship between the values returned by getCurrentBarIndex() and setComputeOnClose, if any?
Thanks very much.
During the backtest of a candlestick chart:
PHP Code:
getBarState() == BARSTATE_NEWBAR
For Renko backtesting the new bar test was a bit different:
PHP Code:
getRawtime(0) != getRawtime(1),
then in realtime for renko:
PHP Code:
getBarState() == BARSTATE_NEWBAR
Running realtime using the Generic Broker Functions, should I still check for getBarState == BARSTATE_NEWBAR or does the getCurrentBarIndex == 0, replace the getBarState() == BARSTATE_NEWBAR test for both bar charts and Renko charts?
What is the relationship between the values returned by getCurrentBarIndex() and setComputeOnClose, if any?
Thanks very much.
Comment