About missed bars on Renko

Created at 06 Aug 2020, 17:25
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
KO

koktos632

Joined 18.01.2020

About missed bars on Renko
06 Aug 2020, 17:25


Hi!
Assume the chart is Renko20
The bot has the handle OnTick() and OnBar()


The current price is 15pips
The next tick is +120pips. It is a gap of 105 pips

How many of times will be the handler OnTick() called?
How many of times will be the handler OnBar() called?

Thank you!


@koktos632
Replies

PanagiotisCharalampous
07 Aug 2020, 08:10

Hi koktos632,

OnTick() should be called once and OnBar() 21 times.

Best Regards,

Panagiotis 

Join us on Telegram

 

 


@PanagiotisCharalampous

koktos632
07 Aug 2020, 12:20

RE:

PanagiotisCharalampous said:

OnTick() should be called once and OnBar() 21 times.

Could you confirm it with your developers, please?

It looks like OnBar()  is not calling as you describe.
I think it is called once like OnTick()
I can not replicate it but I can assume it.
My code misses bars if the market moves with gaps.


 


@koktos632

PanagiotisCharalampous
10 Aug 2020, 14:37

Hi koktos632,

I checked this with the development team and indeed the expected behavior is that OnBar() is called only once and not 21 times as I mentioned above.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

koktos632
10 Aug 2020, 22:28 ( Updated at: 21 Dec 2023, 09:22 )

RE:

It is a bug. Consider my message as the bug report, please.

When will you fix it, please?
 


@koktos632

PanagiotisCharalampous
11 Aug 2020, 07:49

Hi koktos632,

It is not considered a bug. This is how it is designed to work. When more than one bars are created in one tick, then only one OnBar() event will be triggered. We will consider updating the documentation.  

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

koktos632
11 Aug 2020, 08:00

RE:

PanagiotisCharalampous said:

It is not considered a bug. This is how it is designed to work. When more than one bars are created in one tick, then only one OnBar() event will be triggered. We will consider updating the documentation.  

The code does not work as described in the documentation.
It is the bug either in the code either in the documentation.

You may consider it as not a bug of course.
It is up to you in any case. :)

Your answer contains the info I need.

Thank you!
 


@koktos632