OnBar() if Bar is secondary
Created at 06 Jul 2018, 12:21
OnBar() if Bar is secondary
06 Jul 2018, 12:21
Dear Panagiotis,
How do I do
"
protected override void OnBar()
"
if I want to do it on a secondar TimeFrame?
Regards, Alexander
PanagiotisCharalampous
06 Jul 2018, 12:36
Hi Alexander,
This is not possible. OnBar is called only the cBot's timeframe. If you want to handle the OnBar() on another timeframe, you will need to run a cBot on that timeframe as well.
An alternative is to run your code in OnTick() and check each time if a new bar has been added each timeframe series.
Best Regards,
Panagiotis
@PanagiotisCharalampous