Support Board
Date/Time: Sun, 11 May 2025 13:32:27 +0000
ø
View Count: 494
[2023-09-19 19:57:56] |
sgne - Posts: 109 |
ø
Date Time Of Last Edit: 2024-12-05 03:36:09
|
[2023-09-20 19:11:27] |
Sierra_Chart Engineering - Posts: 19542 |
We have to test this. We are not sure about 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, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-09-26 17:58:28] |
Sierra_Chart Engineering - Posts: 19542 |
We do not know the reason for this: However, I've noticed something interesting (and it affects some of my other charts as well). If I have Chart Trade Mode On, then the chart seems good. Otherwise, the chart is sluggish and it's hard to use. Mouse moves don't work well, window resizing is problematic, etc. 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, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2023-09-28 13:56:32] |
Sierra_Chart Engineering - Posts: 19542 |
This function below produces identical bars to the built-in Volume Per Bar functionality in Sierra Chart except that it was adjusting the high price (which was there as an example) which we have now removed. See the code below. It is also necessary though to set this to No: Chart Settings: Split Data Records (applies to Number of Trades, Volume and Range charts) (Chart >> Chart Settings >> Chart Data >> Chart Data menu) SCSFExport CustomChartBarBuildingFunction(SCCustomChartBarInterfaceRef ChartBarInterface)
{ // This is the bar building function which is used along with scsf_CustomChartBarsExample to build custom chart bars. This function tells Sierra Chart when to start a new bar and allows the custom study to make any necessary bar modifications and insert its own file records. // It is Sierra Chart itself, which will combine the Intraday data records into bars and set the Date-Time, Open, High, Low, Last, Volume, Bid Volume, Ask Volume, and Volume at Price data for the chart bars. //This is set to 0 by Sierra Chart upon each entry into this function, but just setting it to 0 here for clarity. ChartBarInterface.StartNewBarFlag = 0; if (ChartBarInterface.IsDeterminingIfShouldStartNewBar) { //This flag is set to 1 and this function is called after the initial processing of the intraday file record but before it is added to the most recent chart bar. Set ChartBarInterface.StartNewBarFlag to 1 to indicate to start a new bar or 0 to indicate not to start a new chart bar. // Below is an example of how a volume-based chart bar is built. Once the volume is equal to or greater than the volume specified through the study Input, then a new chart bar is indicated to be started. After a new bar is added, then ChartBarInterface.NewFileRecord is added to that bar. if (ChartBarInterface.BarHasBeenCutAtStartOfSession) { // This will be true when 'Chart >> Chart Settings >> New Bar at Session Start' is enabled and that condition has been met. } SCInputRef VolumeInput = ChartBarInterface.GetInput(0); const uint64_t CurrentBarVolume = static_cast<uint64_t>(ChartBarInterface.GetChartBarValue(SC_VOLUME, ChartBarInterface.CurrentBarIndex)); if (CurrentBarVolume >= VolumeInput.GetInt()) { ChartBarInterface.StartNewBarFlag = 1; return; } } else if (ChartBarInterface.IsFinalProcessingAfterNewOrCurrentBar) { // This function is called and this flag is true after and Intraday file record is fully processed. This gives the custom study the ability to make any modifications to the most recent chart bar. Or theoretically any chart bar through the ChartBarInterface.GetChartBarValue() function. //This will be true when the first bar is added to the chart if (ChartBarInterface.IsFirstBarOfChart) { //perform initialization. } #ifdef 0 //Example to set the last trade price of the bar to the high of the bar after the bar is finished building. if (ChartBarInterface.IsNewChartBar) { if (ChartBarInterface.CurrentBarIndex >= 1) { ChartBarInterface.GetChartBarValue(SC_LAST, ChartBarInterface.CurrentBarIndex - 1) = ChartBarInterface.GetChartBarValue(SC_HIGH, ChartBarInterface.CurrentBarIndex - 1); } } #endif return; } else if (ChartBarInterface.IsInsertFileRecordsProcessing) { // This function is called and this flag is true when there is a new intraday file record read and it has not yet been processed. That new intraday file record is not provided, but this is an opportunity to perform a "split" operation on the most recent chart bar and break it up into smaller records by reducing its size and putting the excess into ChartBarInterface.NewRecordToInsert. // Set ChartBarInterface.InsertNewRecord to 1 if ChartBarInterface.NewRecordToInsert has been filled out with a new record. In this case, it will be processed normally which means that this function will be called first with ChartBarInterface.IsDeterminingIfShouldStartNewBar set to 1, and again with ChartBarInterface.IsFinalProcessingAfterNewOrCurrentBar set to 1. // When the normal processing is done, this function will be called again with ChartBarInterface.IsInsertFileRecordsProcessing set to 1. If there is no further processing to do, then just return without doing anything further. // Generally the purpose of ChartBarInterface.IsInsertFileRecordsProcessing is to split bars which have been created from Intraday data records that are greater than 1 tick and also to perform splitting for Renko and Range bars when there are price gaps. //Splitting is a multi-iteration process. It is not done all at once. For example, if there is an existing chart bar with a range of 10, and it needs to be broken up into 9 additional bars with a range of 1 each, then the first step is to set its range to 1 and insert a new file record through ChartBarInterface.NewRecordToInsert with a range of 9. When the standard record processing is complete, this function is called again with ChartBarInterface.IsInsertFileRecordsProcessing set to 1, and this process continues by putting the excess range, 8, back into ChartBarInterface.NewRecordToInsert until the process is complete. //Internally Sierra Chart is going to divide up the volume among each chart bar evenly during the splitting process. return; } } We cannot allocate time to this: SC Engr: Can you check to see why this code you provide builds an extra current range bar?
It is best you create a custom chart bar function which accomplishes what you need. 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, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2023-09-28 13:57:12
|
To post a message in this thread, you need to log in with your Sierra Chart account: