Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 11:34:25 +0000



Post From: Help needed on Custom Chart Bars

[2019-01-10 20:50:39]
Andy Sureway - Posts: 93
Hi Sierra Chart team,

I am developing a custom chart bars study which takes account of both volume size and time.

Here is a particular scenario which I am struggling with. Say the last tick data has time stamp at 12 pm, and the next tick data is at 12:03 pm. And I want to add a series of empty bars at 1 minute interval, e.g. 12:01 and 12:02.

For the algorithm part, suppose the study is processing the tick data at 12:03 pm. At the first iteration of the IsDeterminingIfShouldStartNewBar loop, the study determines to start a new bar. Then at the next iteration of the IsFinalProcessingAfterNewOrCurrentBar loop, it creates a new bar including the 12:03 pm tick data. The issue here is, it does not give me any chance to add the empty bars before the 12:03 tick data.

At first thought, I felt the IsInsertFileRecordsProcessing loop provides this opportunity of adding empty bars. However, later through a series of debugging processes, I realized that by the time of this loop, the 12:03 tick data has already formed the next bar.

Could you please guide me on how possibly the empty bars can be added?


An additional observation is, inside the IsInsertFileRecordsProcessing loop, NewFileRecord is reset to zero. I feel that retainment of its value in this loop could be quite useful for many applications.

Thanks!
Date Time Of Last Edit: 2019-01-10 20:52:07