Support Board
Date/Time: Tue, 26 Nov 2024 08:58:03 +0000
Post From: RMO Study Settings
[2014-04-23 21:44:03] |
Sierra Chart Engineering - Posts: 104368 |
We can only provide you the source code of the study. We organized the code a little better and here it is: SCSFExport scsf_RMO(SCStudyInterfaceRef sc) { SCSubgraphRef ST1 = sc.Subgraph[0]; SCSubgraphRef ST2 = sc.Subgraph[1]; SCSubgraphRef ST3 = sc.Subgraph[2]; SCFloatArrayRef MATemp3 = sc.Subgraph[0].Arrays[0]; SCFloatArrayRef MATemp4 = sc.Subgraph[0].Arrays[1]; SCFloatArrayRef MATemp5 = sc.Subgraph[0].Arrays[2]; SCFloatArrayRef MATemp6 = sc.Subgraph[0].Arrays[3]; SCFloatArrayRef MATemp7 = sc.Subgraph[0].Arrays[4]; SCFloatArrayRef MATemp8 = sc.Subgraph[0].Arrays[5]; SCFloatArrayRef MATemp9 = sc.Subgraph[0].Arrays[6]; SCFloatArrayRef MATemp10 = sc.Subgraph[0].Arrays[7]; SCFloatArrayRef MATemp11 = sc.Subgraph[0].Arrays[8]; SCFloatArrayRef MATemp12 = sc.Subgraph[0].Arrays[9]; SCFloatArrayRef Highest = sc.Subgraph[0].Arrays[10]; SCFloatArrayRef Lowest = sc.Subgraph[0].Arrays[11]; SCInputRef Len1 = sc.Input[2]; SCInputRef Len2 = sc.Input[3]; SCInputRef Len3 = sc.Input[4]; SCInputRef Len4 = sc.Input[5]; if (sc.SetDefaults) { sc.GraphName="Rahul Mohindar Oscillator"; ST1.Name="ST1"; ST1.DrawStyle= DRAWSTYLE_IGNORE; ST1.PrimaryColor = RGB(0,255,0); ST2.Name="ST2"; ST2.DrawStyle = DRAWSTYLE_LINE; ST2.PrimaryColor = RGB(255,0,255); ST3.Name="ST3"; ST3.DrawStyle = DRAWSTYLE_LINE; ST3.PrimaryColor = RGB(255,255,0); Len1.Name="Length 1"; Len1.SetInt(2); Len2.Name="Length 2"; Len2.SetInt(10); Len3.Name="Length 3"; Len3.SetInt(30); Len4.Name="Length 4"; Len4.SetInt(81); //During development set this flag to 1, so the DLL can be modified. When development is completed, set it to 0 to improve performance. sc.FreeDLL = 0; sc.AutoLoop = 1; return; } sc.SimpleMovAvg(sc.Close,MATemp3,Len1.GetInt()); sc.SimpleMovAvg(MATemp3,MATemp4,Len1.GetInt()); sc.SimpleMovAvg(MATemp4,MATemp5,Len1.GetInt()); sc.SimpleMovAvg(MATemp5,MATemp6,Len1.GetInt()); sc.SimpleMovAvg(MATemp6,MATemp7,Len1.GetInt()); sc.SimpleMovAvg(MATemp7,MATemp8,Len1.GetInt()); sc.SimpleMovAvg(MATemp8,MATemp9,Len1.GetInt()); sc.SimpleMovAvg(MATemp9,MATemp10,Len1.GetInt()); sc.SimpleMovAvg(MATemp10,MATemp11,Len1.GetInt()); sc.SimpleMovAvg(MATemp11,MATemp12,Len1.GetInt()); sc.Highest(sc.Close, Highest, Len2.GetInt()); sc.Lowest(sc.Close, Lowest, Len2.GetInt()); float Range = Highest[sc.Index]-Lowest[sc.Index]; if ( Range != 0) { ST1[sc.Index]= 100* (sc.Close[sc.Index] - (MATemp3[sc.Index] +MATemp4[sc.Index] +MATemp5[sc.Index] +MATemp6[sc.Index] +MATemp7[sc.Index] +MATemp8[sc.Index] +MATemp9[sc.Index]+MATemp10[sc.Index] +MATemp11[sc.Index] +MATemp12[sc.Index])/10) / Range; } sc.ExponentialMovAvg(ST1,ST2,Len3.GetInt()); sc.ExponentialMovAvg(ST2,ST3,Len4.GetInt()); } 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: 2014-04-23 21:46:02
|