Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 10:46:54 +0000



Possible issue in WriteBarAndStudyDataToFile

View Count: 1447

[2019-02-21 12:40:22]
User942837 - Posts: 108
Is there a reason why StartingIndex parameter of sc.WriteBarAndStudyDataToFile does not print the last bar? To test I have tried to pass in sc.ArraySize - 1 and it prints nothing when the session is closed and I do not want to wait until the next open.

Is there a way sc.WriteBarAndStudyDataToFile would return any Index it is requested or perhaps tell me of a way I can manually loop thru this function.

Thank you for your help.

I'm stuck completely because my external system depends on having the file updated on close.

Thank you
[2019-02-21 18:37:54]
Sierra Chart Engineering - Posts: 104368
The reason is because the last bar may not be complete and it cannot be rewritten to a text file.

While we could add a parameter to override this, it would break compatibility with the existing function and a new function would have to be added which we want to avoid.
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: 2019-02-21 18:38:17
[2019-02-21 19:22:07]
User942837 - Posts: 108
I understand that the last bar may not be complete but if you go to Edit >> Export Bar and Study Data to Text File, it does export the last bar after the session is complete. This is the behavior I am after but I cannot do it manually of course as I am feeding directly to a system outside sierra that uses DTC protocol.

Can't you add this functionality only if the session is over? What's the problem with adding the other function? I mean at some point there always needs to be some refactoring done. If you cannot add the other function can you at least make a custom study in studies6.cpp that does this please?

I am at a point where I cannot proceed any further as I am depending on this functionality. I believe this should be catered for because this function also exports study data that I have no other way to access.

Thank you for understanding
Date Time Of Last Edit: 2019-02-21 19:25:18
[2019-02-23 12:29:39]
User942837 - Posts: 108
Can someone please get back to me on my last comment? If I have a definite reply that this is not going to be catered for (even as a workaround as I have suggested) I will have to unfortunately look at other platforms. This is very unfortunate because I really like sierra but this is a show breaker to me.

Thank you for understanding.
[2019-02-23 22:30:24]
Sierra Chart Engineering - Posts: 104368
Yes we think we can help you with this, and we can work it in sometime in the next couple of weeks, but there would be an additional cost for this like 75 USD.
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
[2019-02-23 23:00:59]
User942837 - Posts: 108
OK that's fine how can i proceed please? Do I pay before or after and how?
[2019-03-01 18:13:08]
User942837 - Posts: 108
Can you please let me know please when this will be implemented?
[2019-03-01 21:15:42]
Sierra Chart Engineering - Posts: 104368
We will get it done this weekend.
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
[2019-03-04 15:57:39]
User942837 - Posts: 108
Hi, I tried downloading release 1880 and still not saving the last bar after session ended. Am I missing something please? Was it included in release 1880?

thanks
[2019-03-04 16:42:34]
Sierra Chart Engineering - Posts: 104368
No this has not yet been released. And there is a new function for this. We will document it today.
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
[2019-03-05 06:47:33]
User942837 - Posts: 108
can you kindly provide a link as to what function you added. I looked and didn't find methods similar to WriteBarAndStudyDataToFile. The functionality I am looking for is that of WriteBarAndStudyDataToFile that includes all the fields including volume, askbid, hlc data and could any study fields that are not hidden.

Am I missing something?

thank you
[2019-03-05 08:59:25]
Sierra Chart Engineering - Posts: 104368
int sc.WriteBarAndStudyDataToFileEx)(const n_ACSIL::s_WriteBarAndStudyDataToFile& WriteBarAndStudyDataToFileParams);

Doc will be out soon.

It is in 1881.
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: 2019-03-05 09:00:12
[2019-03-05 14:23:17]
User942837 - Posts: 108
Thanks, I'll wait for the documentation.

Would you be able to add a study in studies6.cpp that uses this new method please? Ie, a similar method to scsf_WriteBarAndStudyDataToFile?

Thank you
[2019-03-05 17:56:04]
Sierra Chart Engineering - Posts: 104368
We will just modify that study to use the new function.
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
[2019-03-05 18:07:24]
User942837 - Posts: 108
Great! Thank you! will it be in a different release?
[2019-03-05 18:28:21]
Sierra Chart Engineering - Posts: 104368
Yes it will be. But here is an example:
  n_ACSIL::s_WriteBarAndStudyDataToFile WriteBarAndStudyDataToFileParams;
  WriteBarAndStudyDataToFileParams.StartingIndex = sc.UpdateStartIndex;
  WriteBarAndStudyDataToFileParams.OutputPathAndFileName = OutputPathAndFileName;
  WriteBarAndStudyDataToFileParams.IncludeHiddenStudies = IncludeHiddenStudies.GetYesNo();
  WriteBarAndStudyDataToFileParams.IncludeHiddenSubgraphs = IncludeHiddenSubgraphs.GetYesNo();
  WriteBarAndStudyDataToFileParams.AppendOnlyToFile = 0;
  WriteBarAndStudyDataToFileParams.IncludeLastBar = 0;
  sc.WriteBarAndStudyDataToFileEx(WriteBarAndStudyDataToFileParams);

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
[2019-03-05 18:54:56]
User942837 - Posts: 108
do I need to include some file?

Seems like there's some problem referencing the struct. I just copied and pasted the lines above.

error: use of deleted function 'n_ACSIL::s_WriteBarAndStudyDataToFile::s_WriteBarAndStudyDataToFile()'
n_ACSIL::s_WriteBarAndStudyDataToFile WriteBarAndStudyDataToFileParams;

scstructures.h:3202:8: note: 'n_ACSIL::s_WriteBarAndStudyDataToFile::s_WriteBarAndStudyDataToFile()' is implicitly deleted because the default definition would be ill-formed:
struct s_WriteBarAndStudyDataToFile

^
scstructures.h:3202:8: error: uninitialized reference member in 'struct n_ACSIL::s_WriteBarAndStudyDataToFile'
scstructures.h:3205:12: note: 'SCString& n_ACSIL::s_WriteBarAndStudyDataToFile::OutputPathAndFileName' should be initialized
SCString &OutputPathAndFileName;

Would you please be kind and include scsf_WriteBarAndStudyDataToFile method in full please?

Thank you
Date Time Of Last Edit: 2019-03-05 19:03:00
[2019-03-05 21:35:03]
Sierra Chart Engineering - Posts: 104368
This is true. We did correct this but we need to do a new revision. Will be out in about 30 minutes.
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
[2019-03-06 07:52:57]
User942837 - Posts: 108
Hi,

this is still not working as expected.

today is 6th March... I am expecting to have yesterday's closing price (ie 5th March) before next session opens, yet the last entry is still
2019/3/4, 15:30:00.0, 2815.50, 2818.00, 2767.50, 2791.50, 1549109, 711262, 2798.13, 2792.33, 2792.75, 783768, 765341, 0.927071750164032

If I change WriteBarAndStudyDataToFileParams.IncludeLastBar = 0; to 1, I get multiple lines for the 5th of March which is not correct as I am only expecting 1 line for 5th of march after session has closed.

2019/3/5, 15:30:00.0, 2794.75, 2796.75, 2783.25, 2791.50, 961546, 438498, 2791.56, 2790.50, 2790.00, 479677, 481869, 0.927071750164032
2019/3/5, 15:30:00.0, 2794.75, 2796.75, 2783.25, 2791.50, 961546, 438498, 2791.56, 2790.50, 2790.00, 479677, 481869, 0.927071750164032
2019/3/5, 15:30:00.0, 2794.75, 2796.75, 2783.25, 2791.50, 961546, 438498, 2791.56, 2790.50, 2790.00, 479677, 481869, 0.927071750164032
2019/3/5, 15:30:00.0, 2794.75, 2796.75, 2783.25, 2791.50, 961546, 438498, 2791.56, 2790.50, 2790.00, 479677, 481869, 0.927071750164032
2019/3/5, 15:30:00.0, 2794.75, 2796.75, 2783.25, 2791.50, 961546, 438498, 2791.56, 2790.50, 2790.00, 479677, 481869, 0.927071750164032

Kindly fix.

Thank you
Date Time Of Last Edit: 2019-03-06 07:54:12
[2019-03-06 08:00:50]
Sierra Chart Engineering - Posts: 104368
This is not for us to fix. We gave you the basic functionality. You need to utilize that function in such a way that you do not have multiple repeating records at the end. You need to know what the ending index is, and do not call the function with that index again when setting WriteBarAndStudyDataToFileParams.StartingIndex

We expect that you know what you are doing, and can utilize the function properly to meet your requirements. You are putting too much reliance on us which we cannot handle . Once again we expect you to have the programming abilities to do what you need. You need to figure this out. We will add documentation as soon as we can. But the structure members should be self-explanatory especially through experimentation.
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: 2019-03-06 08:04:16
[2019-03-06 08:17:06]
User942837 - Posts: 108
Hi,

thank you for your reply. What I am expecting from sierra is to output the last row after session has closed. I don't think I am asking much! The reason is that I need to use those values immediately after the session closes and not when the next one opens. I do not understand why there needs to be any programming from my end. IncludeLastBar should include last bar of session not have it repeated.

I switched to use DTC protocol so that I do not have to do all this because I was spending much more time trying to debug sierra than doing development. Literally this is the only thing I am using from sierra. This and DTC protocol. I also offered to pay for this.

Do you have a function that gets the last index?

Just to get things straight. I did appreciate your effort. I don't want this to be interpreted as me being rude.

Thanks
Date Time Of Last Edit: 2019-03-06 08:24:02
[2019-03-08 00:04:26]
Sierra Chart Engineering - Posts: 104368
This is still pending follow-up.
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
[2019-03-11 09:49:02]
User942837 - Posts: 108
Can someone kindly follow-up on this?
[2019-03-13 22:27:45]
Sierra Chart Engineering - Posts: 104368
There are many details here including preparing documentation, so this takes some time.

Here is the documentation we prepared to determine how to know if a chart bar has closed:
ACSIL Programming Concepts: Determining if Last Chart Bar is Closed


When the last bar in the chart has closed, then when using this function:
sc.WriteBarAndStudyDataToFileEx()

You can specify to write the last bar to the file by setting the related structure member as follows IncludeLastBar = 1.

Remember the last used StartingIndex in a persistent variable:
sc.GetPersistentInt()

and then do not specify that same StartingIndex with the function again:
sc.WriteBarAndStudyDataToFileEx()

Unless the whole file is being rewritten when the StartingIndex = 0.

If you need more help, there are programmers on this support board who could help you and code what you need, for an extra cost of course. You can just start a new thread that says something like "need programmer".

You now have everything you need to get what you need done. It is definitely possible.

Finally, the cost for the new function is 50 USD. Did you want to add that credit or should we deduct it from usage time paid for?
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: 2019-03-18 17:55:56

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

Login

Login Page - Create Account