Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 12:34:14 +0000



[User Discussion] - How do I reference spreadsheet values from a custom study?

View Count: 1555

[2013-08-13 03:40:38]
Bedhog - Posts: 179
Hello All,

I would like to draw some horizontal lines on a chart.

All of the values I want to work with are in a spreadsheet. Can someone point me to the documentation on referencing spreadsheet data from a custom study? I could also use a hand with the 'if then' structure as shown.

I was able to start this project using the sample line drawing found here
sc.Subgraph[0].Name = "Line";
sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE;
sc.Subgraph[0].PrimaryColor = RGB(0,255,0); // green
sc.Subgraph[0].LineWidth = 5;  
sc.Input[0].Name = "Line Value";
sc.Input[0].SetFloat(50); // default value
sc.Input[0].SetFloatLimits(1, 20000); // min-max value

However, I would like to pull the the colors and the values from a spreadsheet.

Line Value = SpreadsheetReference // '8Range'!AO3

If Spreadsheet1.!tabname.BL3 = 1 // '8Range'!AZ3
then Line Color = RGB(0,255,0); //green
Else If Spreadsheet1.!tabname.BM3 = 1
then Line Color = RGB(255,0,0); //red
Else If Spreadsheet1.!tabname.BN3 = 1
then Line Color = RGB(255,255,255); //white
End

Thank you.
[2013-08-14 00:24:07]
Sierra Chart Engineering - Posts: 104368
This is not supported. However, it is possible to access the Subgraph data from a Spreadsheet study on the chart. You can use this function:
http://www.sierrachart.com/index.php?l=doc/doc_ACSIL_Members.html#scGetStudyArrayUsingID
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
[2013-10-31 23:35:34]
Bedhog - Posts: 179
I'm revisiting this topic and am still stumped. Perhaps somebody can tell me if it's already been done.

I would like to know the 'cumulative delta - volume' beginning the moment of a trade entry.

FulcrumTrader suggested to draw a horizontal line on the Cumulative Delta Bars, and this would work, but I'd like to automate it.

I have the Horizontal Line at Time code from Studies6.cpp and just need to plug-in the trade entry time. :)

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

Login

Login Page - Create Account