Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 20:36:26 +0000



Two technical questions on Custom Chart Bars

View Count: 1042

[2018-08-22 05:16:40]
Andy Sureway - Posts: 93
Hello, I have two technical questions. I would be very happy if any of them can be solved.

1. Is there a way to access the (bid/ask) volume by price data inside the fp_ACSCustomChartBarFunction function, via SCCustomChartBarInterfaceRef?

2. For the class SCCustomChartBarInterfaceRef.NewFileRecord, does it provide the data for a single tick? If not, is there any setting by which I can get a single tick data? If still not, is there a way I can browse the data tick by tick and get a few customized summary information?

Thanks a lot!

Best,

Sureway
[2018-08-22 06:18:32]
Sierra Chart Engineering - Posts: 104368
1. We will add this to the next release.

2. The answer is yes this is already the case if the data is tick by tick in the Intraday chart data file.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-08-22 06:33:20
[2018-08-22 06:36:55]
Andy Sureway - Posts: 93
Thanks a lot!
[2018-08-22 23:15:36]
Andy Sureway - Posts: 93
here are two followup questions.

1. It seems that the variable IsNewChartBar never got set to true (1). If I understand correctly, it should be set to true when a new bar is created (or for the first bar of the session).

2. when persistent variables are used, there is lack of a way to initialize it. A variable to signal the first tick of the chart or the session would be great.


Thanks a lot for your hard work!
[2018-08-23 02:22:41]
Andy Sureway - Posts: 93
Another possible issue. It seems that AskPrice and BidPrice got swapped for s_CustomChartBarInterface.
[2018-08-23 04:35:58]
Sierra Chart Engineering - Posts: 104368
1. When you see this what is the state of the other variables in the data structure?


2.
when persistent variables are used, there is lack of a way to initialize it. A variable to signal the first tick of the chart or the session would be great.

There is a variable indicating the first bar of the chart.

Another possible issue. It seems that AskPrice and BidPrice got swapped for s_CustomChartBarInterface.
If there is a problem with this, it is with your data. There definitively could not be a problem with this.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-08-23 04:38:08
[2018-08-26 20:57:40]
Andy Sureway - Posts: 93
1. After more digging, it seems that BarHasBeenCutAtStartOfSession is working as expected. But IsNewChartBar is always set to zero.

What I did was the following. I put two "if blocks" for BarHasBeenCutAtStartOfSession and IsNewChartBar. Once either variable is true, the corresponding block will be executed. In VS debug mode, I set breakpoints inside the two blocks. While I applied to this to a chart with 3 days' ES data. The BarHasBeenCutAtStartOfSession if block was hit three times, but none for IsNewChartBar.

Not sure whether it was due to a misunderstanding of mine with IsNewChartBar.


2. Which variable it is? It seems to me that the BarHasBeenCutAtStartOfSession should be good enough now.

There is a variable indicating the first bar of the chart.


3. Perhaps this was due to my misreading of the numbers while debugging in VS.

If there is a problem with this, it is with your data. There definitively could not be a problem with this.


Thanks!
[2018-08-26 21:04:02]
Andy Sureway - Posts: 93
A few more question about Custom Chart Bars. I would like to calculate some statistics from the tick data within each bar.

A) Is it true that the only way to do it is through Custom Chart Bars?

B) Are there GetPersistentPointer and SetPersistentPointer functions for SCCustomChartBarInterfaceRef?

C) Is there a way to access the persistent pointer of SCCustomChartBarInterfaceRef (or the custom chart bars function) from another study?

Thank you so much for your hard work!
[2018-08-26 21:08:48]
Andy Sureway - Posts: 93
For question c), I did find the function GetPersistentPointerFromChartStudy. Then it seems that I can use this function to access the tick level statistics from the custom chart bar study. Is my understanding correct? Thanks!
[2018-08-27 18:38:43]
Sierra Chart Engineering - Posts: 104368
We definitively have confirmed that IsNewChartBar is true when there is a new chart bar and IsFinalProcessingAfterNewOrCurrentBar is also true. This works perfectly. There simply could not be a problem with this.


2. Which variable it is?
Refer to the documentation:
ACSIL Interface - Custom Chart Bars: s_CustomChartBarInterface Interface Members for Custom Bar Function


A few more question about Custom Chart Bars. I would like to calculate some statistics from the tick data within each bar.
Have a look at this function as well:
sc.ReadIntradayFileRecordForBarIndexAndSubIndex()
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-08-27 18:39:50

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account