Support Board
Date/Time: Sat, 01 Feb 2025 06:59:56 +0000
[Programming Help] - ACSIL Interface Members - Functions
View Count: 2224
[2019-06-18 21:53:20] |
User630795 - Posts: 92 |
I am trying to modify KnowxvilleDivergence study to find divergence using StochasticMomentumIndicator study instead of RSI. It uses sc.RSI(....) function but according to your documentation, StochasticMomentumIndicator is not available for that. First of all, can you confirm if that is true and also if there is another way. I am attaching part of the KnoxvilleDivergence study that calls RSI study to find divergence: sc.RSI(sc.BaseDataIn[inp_rsi_input.GetInputDataIndex()], graph_rsi, inp_rsi_movavg.GetMovAvgType(), inp_rsi_length.GetInt()); |
[2019-06-18 22:09:29] |
Sierra Chart Engineering - Posts: 104368 |
It uses sc.RSI(....) function but according to your documentation, StochasticMomentumIndicator is not available for that. We do not understand the question.
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-06-18 22:17:12] |
User630795 - Posts: 92 |
I don't understand what you don't understand. according to your list (link provided), SMI is not callable. It is not listed. https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Functions.html |
[2019-06-18 22:18:48] |
Ackin - Posts: 1865 |
StochasticMomentumIndicator is study in file studies8.cpp SCSFExport scsf_StochasticMomentumIndicator "sc.RSI(sc.BaseDataIn[inp_rsi_input.GetInputDataIndex()], graph_rsi, inp_rsi_movavg.GetMovAvgType(), inp_rsi_length.GetInt());" output Stochastic "SMI" as same as "graph_rsi" from RSI.... |
[2019-06-18 22:23:53] |
User630795 - Posts: 92 |
i know where the code for SMI is. i want to be able to refer to it (or call it?) from KnoxvilleDivergence.cpp like "sc.StochcasticMomentumIndicator(sc.BaseDataIn........)" but it is not listed on your list https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Functions.html |
[2019-06-18 22:27:44] |
Ackin - Posts: 1865 |
I understand, but there isn't for this any function. You can copy the block code from file8 .... I'll do this, it's faster for me then write about it ... give me one hour... Date Time Of Last Edit: 2019-06-18 23:20:35
|
[2019-06-18 23:10:52] |
Ackin - Posts: 1865 |
Try this file ... 64-bit
Date Time Of Last Edit: 2019-06-18 23:21:06
|
Knoxville Divergence_64.dll - Attached On 2019-06-18 23:10:33 UTC - Size: 115 KB - 403 views |
[2019-06-18 23:39:45] |
User630795 - Posts: 92 |
may i ask what you did with it? thanks. |
[2019-06-18 23:42:33] |
Ackin - Posts: 1865 |
Is it what you want? Works?
|
[2019-06-18 23:44:12] |
User630795 - Posts: 92 |
i want to use stochastic momentum indicator not just stochastic. did you use stochastic momentum indicator? may i see the source code? it does not work properly for stochastic momentum indicator (SMI) |
[2019-06-19 00:25:01] |
Ackin - Posts: 1865 |
did you use stochastic momentum indicator?
Sure..RSI part is replaced with: SCFloatArrayRef TempLowest = SMI.Arrays[0]; SCFloatArrayRef TempHighest = SMI.Arrays[1]; SCFloatArrayRef TempRelDiff = SMI.Arrays[2]; SCFloatArrayRef TempDiff = SMI.Arrays[3]; SCFloatArrayRef TempAvgRelMA = SMI.Arrays[4]; SCFloatArrayRef TempAvgRel = SMI.Arrays[5]; SCFloatArrayRef TempAvgDiffMA = SMI.Arrays[6]; SCFloatArrayRef TempAvgDiff = SMI.Arrays[7]; sc.Lowest(sc.Low, TempLowest, PercentKLength.GetInt()); sc.Highest(sc.High, TempHighest, PercentKLength.GetInt()); TempRelDiff[sc.Index] = sc.Close[sc.Index] - (TempHighest[sc.Index] + TempLowest[sc.Index]) / 2.0f; TempDiff[sc.Index] = TempHighest[sc.Index] - TempLowest[sc.Index]; sc.ExponentialMovAvg(TempRelDiff, TempAvgRelMA, PercentDLength.GetInt()); sc.ExponentialMovAvg(TempAvgRelMA, TempAvgRel, PercentDLength.GetInt()); sc.ExponentialMovAvg(TempDiff, TempAvgDiffMA, PercentDLength.GetInt()); sc.ExponentialMovAvg(TempAvgDiffMA, TempAvgDiff, PercentDLength.GetInt()); if (TempAvgDiff[sc.Index] != 0.0f) SMI[sc.Index] = TempAvgRel[sc.Index] / (TempAvgDiff[sc.Index] / 2.0f) * 100.0f; else SMI[sc.Index] = 0.0f; If it doesn't work properly, so It's issue this study (I don't use divergence, but I know it had a few limitations). Date Time Of Last Edit: 2019-06-19 00:26:32
|
[2019-06-19 02:17:35] |
User630795 - Posts: 92 |
Yes, I use it with other studies for confirmation. I've used divergence studies for another platform for a long time. If you don't mind, can I have the entire code? I'd like to tweak it for my liking. Thank you again. |
[2019-06-20 15:19:10] |
User630795 - Posts: 92 |
can you email me the source code of the entire study? thanks. |
[2019-06-20 18:28:11] |
Ackin - Posts: 1865 |
I dont know your email... Sign up for our forum, we can improve this or similar study to be useful to everyone and was universal. more info about our work Ackin's indicators (SCH users requests for studies) - Update list | Post: 182033 Date Time Of Last Edit: 2019-09-06 17:04:28
|
To post a message in this thread, you need to log in with your Sierra Chart account: