Support Board
Date/Time: Tue, 24 Dec 2024 01:32:37 +0000
[User Discussion] - User Defined scale
View Count: 1949
[2015-10-18 18:07:03] |
QnReally - Posts: 181 |
I am using the User Defined scale for a chart and I specify the Top of Range and the Bottom of Range manually to start with. Then I am using the mouse to change the price scaling (either to compress/expand the scale, or move the scale up/down). Is there a way to then adjust the Top of Range and the Bottom of Range of the User Defined scale to match the chart? Alternatively, is there a way to access the current values of the top price and bottom price as shown in the chart from ACSIL? Thanks. |
[2015-10-18 18:12:03] |
QnReally - Posts: 181 |
I have two charts that are side by side and I am trying to synchronize the price scales to match by adjusting the second chart's range top/bottom to match the first chart.
|
[2015-10-20 04:33:20] |
Sierra Chart Engineering - Posts: 104368 |
Refer to: http://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scScaleRangeBottom 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 |
[2015-10-20 04:58:20] |
QnReally - Posts: 181 |
There is something I am not getting. Here is what I tried: SCSFExport scsf_Test(SCStudyInterfaceRef sc)
{ if (sc.SetDefaults) { sc.AutoLoop = 1; sc.UpdateAlways = 1; sc.FreeDLL = 0; sc.GraphName = "Test"; sc.DrawZeros = 0; sc.GraphRegion = 0; return; } if (sc.HideStudy) return; if (sc.BaseGraphScaleRangeType != SCALE_USERDEFINED) return; if (sc.BaseGraphScaleRangeTop != sc.ScaleRangeTop || sc.BaseGraphScaleRangeBottom != sc.ScaleRangeBottom) { SCString Buffer; Buffer.Format("User Defined: %.4f - %.4f; Scale Range: %.4f - %.4f", sc.BaseGraphScaleRangeTop, sc.BaseGraphScaleRangeBottom, sc.ScaleRangeTop, sc.ScaleRangeBottom); sc.AddMessageToLog(Buffer, 0); } } Here is what I get in the Message Log and it keeps repeating: Chart: 6EZ5 Renko 2t #2 | Study: Test | User Defined: 1.1366 - 1.1304; Scale Range: 0.0000 - 0.0000 | 2015-10-20 00:54:38
I don't understand why the sc.ScaleRangeTop and sc.ScaleRangeBottom are 0. Thanks. |
[2015-10-20 05:01:42] |
QnReally - Posts: 181 |
By the way, I am using v1312 of SC.
|
[2015-10-23 10:16:19] |
Sierra Chart Engineering - Posts: 104368 |
We made a mistake, you actually need to work with these two ACSIL variables for the main price graph: https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scBaseGraphScaleRangeBottom These apply to the study itself: I don't understand why the sc.ScaleRangeTop and sc.ScaleRangeBottom are 0. 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: 2015-10-23 10:17:05
|
[2015-10-23 14:08:12] |
QnReally - Posts: 181 |
I can't find a solution yet. My goal is for my study to be able to find 1) the Main Graph's User defined top and bottom (this is available to my study via sc.BaseGraphScaleRangeTop and sc.BaseGraphScaleRangeBottom), and 2) the Main Graph's currently displayed high and low of the chart price scale. I don't know how to read this from my study. This is really the question. As you know, I can set the Main Graph's user defined scale and then use the mouse to move the chart scale around and the chart's user defined scale range would be different from what is displayed on the screen. Thanks. |
[2015-10-23 17:15:15] |
ejtrader - Posts: 688 |
You can try this. float vHigh, vLow;
sc.GetMainGraphVisibleHighAndLow(vHigh, vLow); |
[2015-10-23 19:07:54] |
Sierra Chart Engineering - Posts: 104368 |
2) the Main Graph's currently displayed high and low of the chart price scale.
For this use:https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Functions.html#scGetMainGraphVisibleHighAndLow 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 |
[2015-10-27 05:18:01] |
QnReally - Posts: 181 |
Thanks ejtrader and SC.
|
To post a message in this thread, you need to log in with your Sierra Chart account: