Support Board
Date/Time: Wed, 15 Jan 2025 13:06:33 +0000
cci basing the 0 line on the open of the day instead of the MA leght.
View Count: 1087
[2017-07-25 15:24:07] |
ozunainc - Posts: 16 |
can anyone help me do this. what I want to do is make the 0-line to calculate the price from the opening of the day. i'm in the south east so to me the opening is 17:00. (cruel oil market or futures). please see below, I'm not a coder by any means. I try changing the input for line one which is the zero line. thanks in advance. SCSFExport scsf_CommodityChannelIndex(SCStudyInterfaceRef sc) { SCInputRef I_InputData = sc.Input[0]; SCInputRef I_Length = sc.Input[3]; SCInputRef I_Multiplier = sc.Input[4]; SCInputRef I_Line2Value = sc.Input[5]; SCInputRef I_Line3Value = sc.Input[6]; SCInputRef I_MAType = sc.Input[7]; SCInputRef I_Version = sc.Input[8]; SCSubgraphRef CCI = sc.Subgraph[0]; SCSubgraphRef Line1 = sc.Subgraph[1]; SCSubgraphRef Line2 = sc.Subgraph[2]; SCSubgraphRef Line3 = sc.Subgraph[3]; if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Commodity Channel Index"; sc.FreeDLL = 0; sc.AutoLoop = 1; // true sc.GraphRegion = 1; sc.ValueFormat = 2; CCI.Name = "CCI"; CCI.DrawStyle = DRAWSTYLE_BAR; CCI.PrimaryColor = RGB(0,255,0); CCI.DrawZeros= true; Line1.Name = "Line 1"; Line1.DrawStyle = DRAWSTYLE_HIDDEN; Line1.PrimaryColor = RGB(255,0,255); Line1.DrawZeros= [SC_OPEN]; Line2.Name = "Line 2"; Line2.DrawStyle = DRAWSTYLE_LINE; Line2.PrimaryColor = RGB(255,255,0); Line2.DrawZeros = false; Line3.Name = "Line 3"; Line3.DrawStyle = DRAWSTYLE_LINE; Line3.PrimaryColor = RGB(255,127,0); Line3.DrawZeros = false; I_InputData.Name = "Input Data"; I_InputData.SetInputDataIndex(SC_HLC); I_Length.Name = "Length"; I_Length.SetInt(10); I_Length.SetIntLimits(1,MAX_STUDY_LENGTH); I_Multiplier.Name = "Multiplier"; I_Multiplier.SetFloat(0.015f); I_Line2Value.Name = "Line2 Value"; I_Line2Value.SetFloat(100); I_Line3Value.Name = "Line3 Value"; I_Line3Value.SetFloat(-100); I_MAType.Name = "Moving Average Type"; I_MAType.SetMovAvgType(MOVAVGTYPE_SIMPLE); I_Version.SetInt(1); return; } if(I_Version.GetInt() < 1) { I_Version.SetInt(1); I_MAType.SetMovAvgType(MOVAVGTYPE_SIMPLE); } sc.DataStartIndex = I_Length.GetInt(); float Multiplier = I_Multiplier.GetFloat(); if(Multiplier == 0.0f) Multiplier = 0.015f; sc.CCI(sc.BaseDataIn[I_InputData.GetInputDataIndex()], CCI, sc.Index, I_Length.GetInt(), Multiplier, I_MAType.GetMovAvgType()); Line2[sc.Index] = I_Line2Value.GetFloat(); Line3[sc.Index] = I_Line3Value.GetFloat(); } |
[2017-07-25 16:57:08] |
Sierra Chart Engineering - Posts: 104368 |
what I want to do is make the 0-line to calculate the price from the opening of the day.
So do you want the zero line to be at another level other than zero? Do you want it to be at what the CCI value is at 17:00?
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: 2017-07-25 16:58:31
|
[2017-07-25 17:30:53] |
ozunainc - Posts: 16 |
yes, but I want it to measure from the open price of the day so 17:00.(so that the open represent the 0 line) take today for example,price open at 46.46 (cruel oil) therefore the zero line will start measuring from there 46.46 as price goes up or down. the input moving average will go into overbought or oversold. I believe that cci will measure + or - from that point giving the user a better view of the market or making the chart a big cci own itself. I try to download a image file, but is not letting me. thanks again
Date Time Of Last Edit: 2017-07-25 17:32:24
|
stragegic 1.png / V - Attached On 2017-07-25 17:20:42 UTC - Size: 126.33 KB - 331 views |
[2017-07-25 17:32:47] |
ozunainc - Posts: 16 |
sorry see attached image. it worked
|
[2017-07-25 21:06:54] |
Sierra Chart Engineering - Posts: 104368 |
OK this is much more advanced. We can refer you to a programmer that might be able to help you with this. But that would be for an additional cost. 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 |
[2017-07-26 01:03:12] |
ozunainc - Posts: 16 |
ok please send the info. thanks again
|
[2017-07-26 02:53:36] |
Sierra Chart Engineering - Posts: 104368 |
Contact Jim _At_ sierrachart.com 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, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2017-07-26 02:53:57
|
To post a message in this thread, you need to log in with your Sierra Chart account: