Login Page - Create Account

Support Board


Date/Time: Tue, 23 Oct 2018 19:31:18 +0000



Sierra Chart Now Supports Building Custom Chart Bars Efficiently in ACSIL

Support Request:
[2017-11-07 11:57:58]
Sierra Chart Engineering - Posts: 65140
Version 1638 of Sierra Chart now supports building custom chart bars efficiently using ACSIL.

There is no formal documentation yet and we will not be providing any support for this at this time.

If you cannot comprehend the example, then do not use it and do not ask us questions here. This is only for use by competent developers.

For an example, refer to /ACS_Source/ACSILCustomChartBars_Example.cpp
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-11-07 17:37:56]
gomifromparis - Posts: 211
Getting the "incorrect URL when getting files list to download" in the updater
[2017-11-07 17:53:47]
Sierra Chart Engineering - Posts: 65140
Try again. We removed version 1638. The current version is now 1639.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-11-08 09:56:48]
DabbaDo - Posts: 103
1. Is there any way to set RenkoOpen and RenkoClose on each bar?
2. The interface has GetPersistentInt/Float/Double. GetPersistentPointer would be nice.
3. As with CustomChart, it seems impossible to set/display subgraphs on the study. Is that correct?


Cheers,
Dale
[2017-11-08 17:53:39]
Sierra Chart Engineering - Posts: 65140
1. Not currently but we can add that capability.

2. Possibly but we would be afraid of this being improperly used due to the increased complexity since there are two functions involved and one of them runs on another thread.

3. Yes this is true.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2017-11-08 17:54:16
[2017-11-08 22:07:58]
DabbaDo - Posts: 103
I crash when I use ChartBarInterface.GetPersistentInt/Float/Double. All three Internal_GetPersistentXXX functions have 0x00000000 addresses. The other internal functions are set okay.
v1639

Cheers,
Dale
[2017-11-08 23:05:09]
Sierra Chart Engineering - Posts: 65140
OK looks like we did not set those pointers.

Checking on this.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-11-11 23:10:54]
Sierra Chart Engineering - Posts: 65140
1. Is there any way to set RenkoOpen and RenkoClose on each bar?
This will be supported by this new ACSIL variable in the next release:
sc.AllocateAndNameRenkoChartBarArrays
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2017-11-11 23:11:13
[2017-11-13 11:33:45]
DabbaDo - Posts: 103
Thank you, I look forward to trying sc.AllocateAndNameRenkoChartBarArrays.
These custom bars are wonderful, a great addition to your platform in my opinion. Attached is a favorite bar type of mine, for what it's worth. You can safely ignore it. It's likely that I'm doing some things incorrectly.

Some issues:
1. In the studies dialog, when I Remove a custom chart and Add another then Apply the chart is not reloaded. Duplication steps:
---a. Add Custom Study "Custom Chart Bars Example" with the default 1000 volume. Exit the studies dialog.
---b. Open the studies dialog. Remove Custom Chart Bar Volume=1000 then Add Custom Study "Custom Chart Bars Example" with 2000 volume. Apply or OK. Notice the bars don't change (debugger shows the CustomChartBarBuildingFunction isn't called.)
2. Maybe not a bug: sc.AreTimeSpecificBars() comes back true if the scid bars are 1s or 1m etc. Sometimes other studies need to know if the base bar is a tick bar, a time-based bar, etc.
3. Nice-to-haves:
---a. A flag in ChartBarInterface that is true on the first call after sc.FlagToReloadChartData. Currently I'm tracking the CurrentBarIndex to know when I should re-initialize state. Perhaps there is a better way and I just missed it.
---b. GetPersistentInt64
---c. GetPersistentSCDateTime

Cheers,
Dale
attachmentBruUniVolumeTick.cpp - Attached On 2017-11-13 11:16:58 UTC - Size: 9.82 KB - 96 views
[2017-11-14 17:17:32]
Sierra Chart Engineering - Posts: 65140
We will work through this. Just give us a couple of days.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-11-15 00:54:41]
Sierra Chart Engineering - Posts: 65140
This will be out in the next release.

Except for item 2 which is just how this is.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-11-15 05:25:56]
Sierra Chart Engineering - Posts: 65140
One thing we want to say, that in the next release of Sierra Chart, it is the custom chart bar study itself which will be responsible for flagging to reload the chart even initially when the study is added to the chart.

The code example has been updated to demonstrate how to do this.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2017-11-15 17:17:17
[2017-11-15 13:49:09]
DabbaDo - Posts: 103
That was a big improvement. To close the loop for anyone who wants it, attached is the updated version.
Sierra Chart is super!
Thank you again.
Dale
attachmentBruUniVolumeTick.cpp - Attached On 2017-11-15 13:47:41 UTC - Size: 9.41 KB - 132 views
[2017-11-15 18:25:39]
Sierra Chart Engineering - Posts: 65140
Here are the instructions to use this:
https://www.sierrachart.com/index.php?page=doc/BuildCustomStudiesDLL.html
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-12-21 08:46:04]
gomifromparis - Posts: 211
Hi,

Could you publish a quick example of the IsInsertFileRecordsProcessing using a Range or a Renko bar? No problem if you can't, I'll fiddle around.

My use case is building a variable Renko bar, I've calculated that because of the taker fees on Bitmex, my tick size needs to be equal to 0.005% of the BTC price for my reward to be at least equal to my risk (ie 8 point TickSize with a 16000 BTC)

So instead of adjusting the Ticksize all day, it will be simpler to use a variable renko.

Thanks
[2017-12-23 18:41:49]
gomifromparis - Posts: 211
So I did some fiddling and could not understand how the bar splitting works to manage the gaps.

I have something like

s_IntradayRecord& record = ChartBarInterface.NewFileRecord;
if (ChartBarInterface.IsNewChartBar)
  if (record.Close > whatever condition) // we have a gap here on this tick
  {
    ChartBarInterface.InsertNewRecord = 1;
    ChartBarInterface.NewRecordToInsert = record; // resend the tick
  }


But the tick is not resent and IsInsertFileRecordsProcessing is never true.

Any suggestion ?
Date Time Of Last Edit: 2017-12-23 18:43:52
[2017-12-24 01:16:19]
Sierra Chart Engineering - Posts: 65140
We have to put together an example. Not sure how quickly we can get to that though.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-12-24 17:00:35]
gomifromparis - Posts: 211
OK thanks, could please explain as well how the session gap is managed, in my case BarHasBeenCutAtStartOfSession seems always false.
[2017-12-26 00:31:51]
Sierra Chart Engineering - Posts: 65140
We are working on a Range bars example and also demonstrates BarHasBeenCutAtStartOfSession.

We hope this will be ready by morning.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-12-27 01:06:55]
Sierra Chart Engineering - Posts: 65140
Have a look at the new Range bars example in /ACS_Source/ACSILCustomChartBars_Example.cpp in version 1676.

It is a simplified example of an implementation of Range bars.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-12-27 11:17:24]
gomifromparis - Posts: 211
I tried it, but like my own code, it doesn't fill the gaps

See DAX : when market is liquid it's ok we get 10 range bars, but on the start on the march contract, with big gaps, they are not filled.

The debugger also shows that IsInsertFileRecordsProcessing is never true.

Anything I need to set somewhere ?
Date Time Of Last Edit: 2017-12-27 11:17:34
imagesierrarangegap.png / V - Attached On 2017-12-27 11:16:31 UTC - Size: 63.62 KB - 111 views
[2017-12-27 18:41:06]
Sierra Chart Engineering - Posts: 65140
In regards to filling gaps, you either need to use one of the Gap Fill options documented here:
https://www.sierrachart.com/index.php?page=doc/ChartSettings.html#IntradayChartBarPeriod_GapFill

Or you need to just fill the gaps by adjusting the high and low values in the custom chart bar building function.


The debugger also shows that IsInsertFileRecordsProcessing is never true.
We have now fixed this. We will have a new release out today.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-12-27 22:20:42]
gomifromparis - Posts: 211
I tried the 1677, but it's still not behaving like expected.

Now IsInsertFileRecordsProcessing is always true, on every call of the function ; it appears some bars do get created, but the chart still does not have the correct look of the standard gap filled Range chart.
imagecustomgapfill.png / V - Attached On 2017-12-27 22:19:55 UTC - Size: 64.58 KB - 108 views
[2017-12-27 23:03:39]
Sierra Chart Engineering - Posts: 65140
Now IsInsertFileRecordsProcessing is always true, on every call of the function ;
We apologize for this. We had not done any testing related to the variable. We have now and it is corrected.

We have now released a new revision of 1677. Update again. Although the version will remain the same.

Regarding gaps, we do not have much time to look at that now, but see if there is any difference.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-12-27 23:36:13]
gomifromparis - Posts: 211
It seems
ChartBarInterface.InsertNewRecord = 1;

is missing in the sample.

The chart is starting to add bars, but still some issues.

I see the bars created in IsInsertFileRecordsProcessing being sent once, so they arrive in IsDeterminingIfShouldStartNewBar, and then in IsFinalProcessingAfterNewOrCurrentBar, but then there is a problem, IsFinalProcessingAfterNewOrCurrentBar is sent one more time instead of IsInsertFileRecordsProcessing , so the bar splitting process can't continue.

So if we add no bar, we have

IDISNB
IFPANOCB
IIFRP

IDISNB
IFPANOCB
IIFRP

IDISNB
IFPANOCB
IIFRP

but if we create a new bar in the underlined IIFRP, we get the sequence

IDISNB
IFPANOCB
IIFRP

IDISNB
IFPANOCB
IFPANOCB

IDISNB
IFPANOCB
IIFRP

IDISNB
IFPANOCB
IIFRP

but I think we may be close..
Date Time Of Last Edit: 2017-12-27 23:36:42
[2017-12-30 09:34:41]
gomifromparis - Posts: 211
Any news on this ?
[2017-12-30 09:56:52]
Sierra Chart Engineering - Posts: 65140
No, we have not yet had a chance to test. Should be getting to it in a couple of days.

Whatever you are seeing we are fairly certain this is the correct behavior though. It would have to be. It is not any different than how bars are built within Sierra Chart directly.

But we just want to go through it to make sure.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2017-12-30 09:58:34
[2017-12-30 09:58:51]
Sierra Chart Engineering - Posts: 65140
The prior post has been updated.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2017-12-30 10:41:30]
gomifromparis - Posts: 211
Please do check, you will see it is not giving the expected 10 range chart, I just checked 1678 build.

Custom Range bar : top chart of included pic
Normal working range bar : bottom chart of included pic

Thanks
Date Time Of Last Edit: 2017-12-30 10:42:05
imagesierracustomrange.png / V - Attached On 2017-12-30 10:39:23 UTC - Size: 33.14 KB - 133 views
[2018-01-02 07:53:42]
Sierra Chart Engineering - Posts: 65140
We are looking this over now.

This has already been corrected:
It seems
ChartBarInterface.InsertNewRecord = 1;

is missing in the sample.

Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2018-01-02 07:54:34
[2018-01-02 08:06:14]
Sierra Chart Engineering - Posts: 65140
We found the problem. We are just finishing with the testing now.

We apologize for the delay. We basically have been working nonstop over the holiday. Just getting to this now though.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2018-01-02 09:04:07]
Sierra Chart Engineering - Posts: 65140
We have released version 1679.

Update to that Prerelease version. This is an additional revision of it.

Keep in mind that the Range bars example is not the same as what is built into Sierra Chart. It is just a simplified example and is not as thorough of an implementation. So the ranges are not always going to match the setting.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2018-01-02 09:05:46
[2018-01-02 10:20:03]
gomifromparis - Posts: 211
OK works now. Thanks
[2018-01-03 20:42:32]
gomifromparis - Posts: 211
I'm doing a couple validation tests on chart replay and I have strange issues, so I tested the Range example and it exhibits the same.
I recorded an example on a 10 Custom Range chart, Fill Gap is set to all.

Market is at 13020
Market ticks from 13020 to 13034. The bar is not split so we get a big 28 tick high bar.
Then a new 13031 tick arrives, and this new tick causes the 13020-13034 bar to be split.

So the splitting arrives one tick late, we should not see a 28 tick bar, it should be split on the fly.
Date Time Of Last Edit: 2018-01-03 20:43:27
attachmentrange.mp4 - Attached On 2018-01-03 20:42:23 UTC - Size: 92.49 KB - 112 views
[2018-01-05 00:24:59]
gomifromparis - Posts: 211
This can actually be observed on a historical chart, all the bars created by a gap tick using ChartBarInterface.InsertNewRecord = 1 have the timestamp of the next tick.
imagegaptimestamp.png / V - Attached On 2018-01-05 00:24:43 UTC - Size: 50.1 KB - 96 views
[2018-01-05 00:30:33]
Sierra Chart Engineering - Posts: 65140
This does make sense. Splitting does not occur until there is a new file record read and there is certainty the existing file record is finalized.

We will see if we can easily improve upon this and split even after a single tick record immediately.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2018-01-05 00:55:34]
gomifromparis - Posts: 211
ok thanks
[2018-04-20 16:21:58]
Andy Sureway - Posts: 57
I am working on a variant of the reversal bar chart, in which the new bar starts at the most recent high/low, instead of at the tick meeting the reversal size.

For example, if the reversal size is 10. The order flow increases from price 950 to 1000 at tick i. And then it decreases continually to 999, 998, ...., and then 990 at tick j. Existing reversal bar chart starts a new bar at tick j. What I want is to start the bar at tick i.

This requires ACSIL programming to go back to the most recent high (low), e.g. tick i, and to modify its status. Do you think this is technically possible?

Thanks a lot!

BTW, Sierra Chart is amazing, and it is the only platform I ever want to use.
[2018-04-20 18:10:53]
Andy Sureway - Posts: 57
I just looked into the technical details.

The first question to me whether this kind of study processes the data tick by tick?

My guess is the statement
sc.UsesCustomChartBarFunction = 1;
changes the behavior into of iterating over ticks instead of the usual behavior of iterating of bars.

And
ChartBarInterface.CurrentBarIndex
is the index of the output bars. I guess there is no tick indexing. So my first thought of rewinding back to the most recent high/low and modifying
ChartBarInterface.StartNewBarFlag = 1
is not possible.

Then the next option is to record all the information after the most recent high (low) up to the current tick. In case of a reversal, do modification of the last generated bar, in term of the date/time, high/low, open/close, volume, ask/bid volume, (ask/bid) volume by price ...

I'd appreciate your input on this approach? Any possible hurdle or inefficiency you can see?

Thanks a lot!
[2018-04-22 23:06:51]
Sierra Chart Engineering - Posts: 65140

We will see if we can easily improve upon this and split even after a single tick record immediately.
The answer to this, is that it was not possible and was going to cause significant complications.


This requires ACSIL programming to go back to the most recent high (low), e.g. tick i, and to modify its status. Do you think this is technically possible?
What do you mean by "status"?




The first question to me whether this kind of study processes the data tick by tick?
Yes.

. In case of a reversal, do modification of the last generated bar, in term of the date/time, high/low, open/close, volume, ask/bid volume, (ask/bid) volume by price ...
We would not recommend modifying the Date-Time. Certainly you can modify these other items except the volume at price data.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2018-04-22 23:07:01
[2018-04-23 00:00:21]
Andy Sureway - Posts: 57
Thanks a lot for your reply. I just abandoned this direction because of the difficulties.
[2018-04-30 22:17:30]
Andy Sureway - Posts: 57
I just come back with another two questions while working on a custom chart bar construction.

How to access the basic data for each tick?

Such as price, volume, bid and ask information?


Is it true that the statement

ChartBarInterface.StartNewBarFlag = 1;

generates a new bar with the Next tick as the first tick data, while the current tick data as the last tick for the current bar?


[2018-05-01 02:33:43]
Andy Sureway - Posts: 57
Here is my guesses:

Method 1
ChartBarInterface.GetChartBarValue(SC_LAST, ChartBarInterface.CurrentBarIndex);
to get the current tick price.

ChartBarInterface.GetChartBarValue(SC_BID_PRICE, ChartBarInterface.CurrentBarIndex);
to get the current tick bid price.

ChartBarInterface.GetChartBarValue(SC_ASK_PRICE, ChartBarInterface.CurrentBarIndex);
to get the current tick ask price.

ChartBarInterface.GetChartBarValue(SC_VOLUME, ChartBarInterface.CurrentBarIndex) - ChartBarInterface.GetChartBarValue(SC_VOLUME, ChartBarInterface.CurrentBarIndex-1);
to get the current tick volume.


Method 2

Another approach I could think about is to write these corresponding fields of SCStudyInterfaceRef from the study function to persistent variables and then in the fp_ACSCustomChartBarFunction function, they are read out from the persistent variables.


Question 2

Please comment and advice on the above two methods! Thanks!


Also please comment whether
ChartBarInterface.StartNewBarFlag = 1;
creates a new bar from the next tick.
Date Time Of Last Edit: 2018-05-01 02:34:10
[2018-05-01 02:41:00]
Sierra Chart Engineering - Posts: 65140

How to access the basic data for each tick?

Such as price, volume, bid and ask information?

You need to use this member structure:
s_CustomChartBarInterface::NewFileRecord;

It has all the data you need. What you describe and post 43 is not the way to do this.

And:
s_CustomChartBarInterface::BidPrice;
s_CustomChartBarInterface::AskPrice;


generates a new bar with the Next tick as the first tick data, while the current tick data as the last tick for the current bar?
No, when setting ChartBarInterface.StartNewBarFlag = 1, the NewFileRecord will become part of the next new bar.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2018-05-01 04:37:54
[2018-05-01 03:58:15]
Andy Sureway - Posts: 57
Thanks!

I just updated to the latest version and see the members you just pointed to. Also I am so impressed by your speed of updating!


Is it possible to consider providing a mechanism to start a new bar at the current tick with the tick being the first of the next bar? I understand as you pointed out a few posters back that going back and modifying the data is very complicated. But in this case, it is just a matter of 1 tick data. Do you think this could be a practical improvement?

Thanks a lot for your great support!

Best,
[2018-05-01 04:14:35]
Sierra Chart Engineering - Posts: 65140
Is it possible to consider providing a mechanism to start a new bar at the current tick with the tick being the first of the next bar?
Actually, this is exactly how it currently works now that we think through this a little more.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2018-05-01 04:14:41
[2018-05-01 04:27:31]
Andy Sureway - Posts: 57
Cool! Thanks a lot!
[2018-05-02 01:20:16]
Andy Sureway - Posts: 57
One strange issue found. After add the custom bar type, Sierra Chart keeps reloading data repeatedly. Do you know what is going on? Is that because there is a possible error in code? Thanks for your input!
[2018-05-02 01:41:04]
Andy Sureway - Posts: 57
Figured it out now. It was caused by the study function and the fp_ACSCustomChartBarFunction function used the same persistent variables.
[2018-05-02 01:47:02]
Andy Sureway - Posts: 57
Well then another issue popped up. Inside the fp_ACSCustomChartBarFunction function, the persistent variables are not initialized.

I am still searching but haven't figured out a way similar to
if (sc.Index == 0)
statement yet.

BTW, I am on version 1738.
Date Time Of Last Edit: 2018-05-02 01:48:01
[2018-05-02 01:57:31]
Andy Sureway - Posts: 57
Very Wired observation

The first time the study gets loaded, these persistent variables are initialized to 0 properly. However, a recalculation seems forgetting to do the initialization for them.
[2018-05-02 04:49:12]
Sierra Chart Engineering - Posts: 65140
However, a recalculation seems forgetting to do the initialization for them.
This is expected.

Refer to the documentation here:
http://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Functions.html#scGetPersistentInt
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2018-05-02 06:58:11]
Andy Sureway - Posts: 57
Yes, that is by definition of persistency. But is there a mechanism to do initialization on the first tick in a fp_ACSCustomChartBarFunction? Thanks!
[2018-05-02 08:33:19]
Sierra Chart Engineering - Posts: 65140
You can do the initialization when this is set to 1:
s_CustomChartBarInterface::IsFirstBarOfChart


As we are answering these questions we are making additional notes for the formal documentation so all of this will be included.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2018-05-02 08:33:28
[2018-05-02 11:42:38]
Andy Sureway - Posts: 57
Thanks!

s_CustomChartBarInterface::IsFirstBarOfChart

Does it mean the first tick or all the ticks in the first bar?
[2018-05-02 18:11:13]
Sierra Chart Engineering - Posts: 65140
In the case of tick by tick data, this would be the first tick.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2018-05-02 21:50:25]
Andy Sureway - Posts: 57
Good to know this. Thanks!
[2018-05-04 20:51:57]
Andy Sureway - Posts: 57
Bug reporting

It seems that the close prices for the custom generated bars are not correctly set. It seems that the "high"s are written to the "close" filed. Attached please find an example.

Should you need more information, please let me know. I will be happy to help as much as I can.

Best,

Andy
imageScreen Shot 2018-05-04 at 1.49.51 PM.png / V - Attached On 2018-05-04 20:50:17 UTC - Size: 132.89 KB - 68 views
[2018-05-04 21:43:12]
Sierra Chart Engineering - Posts: 65140
We definitely do not believe there is a bug. Really would be impossible. Check your code and make sure you are not changing the close value of a bar.
Sierra Chart Support - Engineering Level

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

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
Date Time Of Last Edit: 2018-05-04 21:43:25
[2018-05-04 23:25:07]
Andy Sureway - Posts: 57
Just checked the code. There were some codes inherited from the given example which replaced close prices by highs. Sorry for the confusion on my part.

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

Login


Login Page - Create Account