Martin Pring's Special K free

by Doustzadeh in category Oscilator at 06/12/2021
Description

Created by Martin Pring, Special K is a momentum indicator that combines short-, intermediate- and long-term velocity into one complete series, thereby giving us true summed cyclicality. It has two functions: first, to identify primary trend reversals at a relatively early stage; second, to use that information for timing short-term pro-trend price moves.

 

Github: GitHub - Doustzadeh/cTrader-Indicator

 

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.
Formula / Source Code
Language: C#
Trading Platform: cAlgocTrader
´╗┐using cAlgo.API;
using cAlgo.API.Indicators;

namespace cAlgo
{
    [Levels(0)]
    [Indicator(IsOverlay = false, AccessRights = AccessRights.None)]
    public class SpecialK : Indicator
    {
        // Special K = 10 Period Simple Moving Average of ROC(10) * 1
        //           + 10 Period Simple Moving Average of ROC(15) * 2
        //           + 10 Period Simple Moving Average of ROC(20) * 3
        //           + 15 Period Simple Moving Average of ROC(30) * 4
        //           + 50 Period Simple Moving Average of ROC(40) * 1
        //           + 65 Period Simple Moving Average of ROC(65) * 2
        //           + 75 Period Simple Moving Average of ROC(75) * 3
        //           +100 Period Simple Moving Average of ROC(100)* 4
        //           +130 Period Simple Moving Average of ROC(195)* 1
        //           +130 Period Simple Moving Average of ROC(265)* 2
        //           +130 Period Simple Moving Average of ROC(390)* 3
        //           +195 Period Simple Moving Average of ROC(530)* 4

        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter("ROC1 Periods", Group = "ROC", DefaultValue = 10)]
        public int RocPeriods1 { get; set; }

        [Parameter("ROC2 Periods", Group = "ROC", DefaultValue = 15)]
        public int RocPeriods2 { get; set; }

        [Parameter("ROC3 Periods", Group = "ROC", DefaultValue = 20)]
        public int RocPeriods3 { get; set; }

        [Parameter("ROC4 Periods", Group = "ROC", DefaultValue = 30)]
        public int RocPeriods4 { get; set; }

        [Parameter("ROC5 Periods", Group = "ROC", DefaultValue = 40)]
        public int RocPeriods5 { get; set; }

        [Parameter("ROC6 Periods", Group = "ROC", DefaultValue = 65)]
        public int RocPeriods6 { get; set; }

        [Parameter("ROC7 Periods", Group = "ROC", DefaultValue = 75)]
        public int RocPeriods7 { get; set; }

        [Parameter("ROC8 Periods", Group = "ROC", DefaultValue = 100)]
        public int RocPeriods8 { get; set; }

        [Parameter("ROC9 Periods", Group = "ROC", DefaultValue = 195)]
        public int RocPeriods9 { get; set; }

        [Parameter("ROC10 Periods", Group = "ROC", DefaultValue = 265)]
        public int RocPeriods10 { get; set; }

        [Parameter("ROC11 Periods", Group = "ROC", DefaultValue = 390)]
        public int RocPeriods11 { get; set; }

        [Parameter("ROC12 Periods", Group = "ROC", DefaultValue = 530)]
        public int RocPeriods12 { get; set; }

        [Parameter("SMA1 Periods", Group = "SMA", DefaultValue = 10)]
        public int SmaPeriods1 { get; set; }

        [Parameter("SMA2 Periods", Group = "SMA", DefaultValue = 10)]
        public int SmaPeriods2 { get; set; }

        [Parameter("SMA3 Periods", Group = "SMA", DefaultValue = 10)]
        public int SmaPeriods3 { get; set; }

        [Parameter("SMA4 Periods", Group = "SMA", DefaultValue = 15)]
        public int SmaPeriods4 { get; set; }

        [Parameter("SMA5 Periods", Group = "SMA", DefaultValue = 50)]
        public int SmaPeriods5 { get; set; }

        [Parameter("SMA6 Periods", Group = "SMA", DefaultValue = 65)]
        public int SmaPeriods6 { get; set; }

        [Parameter("SMA7 Periods", Group = "SMA", DefaultValue = 75)]
        public int SmaPeriods7 { get; set; }

        [Parameter("SMA8 Periods", Group = "SMA", DefaultValue = 100)]
        public int SmaPeriods8 { get; set; }

        [Parameter("SMA9 Periods", Group = "SMA", DefaultValue = 130)]
        public int SmaPeriods9 { get; set; }

        [Parameter("SMA10 Periods", Group = "SMA", DefaultValue = 130)]
        public int SmaPeriods10 { get; set; }

        [Parameter("SMA11 Periods", Group = "SMA", DefaultValue = 130)]
        public int SmaPeriods11 { get; set; }

        [Parameter("SMA12 Periods", Group = "SMA", DefaultValue = 195)]
        public int SmaPeriods12 { get; set; }

        [Parameter("Signal Periods", DefaultValue = 9, MinValue = 1)]
        public int SignalPeriods { get; set; }

        [Output("Special K", LineColor = "DodgerBlue")]
        public IndicatorDataSeries SK { get; set; }

        [Output("Signal", LineColor = "Red")]
        public IndicatorDataSeries Signal { get; set; }

        private PriceROC Roc1, Roc2, Roc3, Roc4, Roc5, Roc6, Roc7, Roc8, Roc9, Roc10,
        Roc11, Roc12;
        private SimpleMovingAverage RCMA1, RCMA2, RCMA3, RCMA4, RCMA5, RCMA6, RCMA7, RCMA8, RCMA9, RCMA10,
        RCMA11, RCMA12;
        private SimpleMovingAverage SignalSMA;

        protected override void Initialize()
        {
            Roc1 = Indicators.PriceROC(Source, RocPeriods1);
            Roc2 = Indicators.PriceROC(Source, RocPeriods2);
            Roc3 = Indicators.PriceROC(Source, RocPeriods3);
            Roc4 = Indicators.PriceROC(Source, RocPeriods4);
            Roc5 = Indicators.PriceROC(Source, RocPeriods5);
            Roc6 = Indicators.PriceROC(Source, RocPeriods6);
            Roc7 = Indicators.PriceROC(Source, RocPeriods7);
            Roc8 = Indicators.PriceROC(Source, RocPeriods8);
            Roc9 = Indicators.PriceROC(Source, RocPeriods9);
            Roc10 = Indicators.PriceROC(Source, RocPeriods10);
            Roc11 = Indicators.PriceROC(Source, RocPeriods11);
            Roc12 = Indicators.PriceROC(Source, RocPeriods12);

            RCMA1 = Indicators.SimpleMovingAverage(Roc1.Result, SmaPeriods1);
            RCMA2 = Indicators.SimpleMovingAverage(Roc2.Result, SmaPeriods2);
            RCMA3 = Indicators.SimpleMovingAverage(Roc3.Result, SmaPeriods3);
            RCMA4 = Indicators.SimpleMovingAverage(Roc4.Result, SmaPeriods4);
            RCMA5 = Indicators.SimpleMovingAverage(Roc5.Result, SmaPeriods5);
            RCMA6 = Indicators.SimpleMovingAverage(Roc6.Result, SmaPeriods6);
            RCMA7 = Indicators.SimpleMovingAverage(Roc7.Result, SmaPeriods7);
            RCMA8 = Indicators.SimpleMovingAverage(Roc8.Result, SmaPeriods8);
            RCMA9 = Indicators.SimpleMovingAverage(Roc9.Result, SmaPeriods9);
            RCMA10 = Indicators.SimpleMovingAverage(Roc10.Result, SmaPeriods10);
            RCMA11 = Indicators.SimpleMovingAverage(Roc11.Result, SmaPeriods11);
            RCMA12 = Indicators.SimpleMovingAverage(Roc12.Result, SmaPeriods12);

            SignalSMA = Indicators.SimpleMovingAverage(SK, SignalPeriods);
        }

        public override void Calculate(int index)
        {
            SK[index] = 1 * RCMA1.Result[index] + 2 * RCMA2.Result[index] + 3 * RCMA3.Result[index] + 4 * RCMA4.Result[index] + 1 * RCMA5.Result[index] + 2 * RCMA6.Result[index] + 3 * RCMA7.Result[index] + 4 * RCMA8.Result[index] + 1 * RCMA9.Result[index] + 2 * RCMA10.Result[index] + 3 * RCMA11.Result[index] + 4 * RCMA12.Result[index];

            Signal[index] = SignalSMA.Result[index];
        }

    }
}
Comments

brooks4553 - May 30, 2022 @ 21:57

It was a pleasure to read this article because of the interesting material https://ipsnews.net/business/2021/12/02/5-best-college-paper-writing-services-to-hire-an-essay-writer-from/ it contained. The deadlines for my college tasks were missed because I was so engrossed in a single piece of literature. After reading the essay, I realized that you don't have to do everything on your own. This doesn't imply you have to do everything yourself.

caris040 - June 15, 2022 @ 10:32

I am passionate about IT Microsoft certification exam dumps. We provide the latest dumps questions and answers. Our success rates in the past two years have been absolutely impressive, thanks to our happy customers who are now able to propel their careers in the fast lane. Certsout is the number one choice among IT professionals. We help you do exactly that with our high-quality Exam Dumps study guide materials. If you need the latest and most updated questions and answers required then visit vcetests.com because studying without dumps is not easy.

caris040 - June 15, 2022 @ 10:33

I am passionate about IT Microsoft certification exam dumps. We provide the latest dumps questions and answers. Our success rates in the past two years have been absolutely impressive, thanks to our happy customers who are now able to propel their careers in the fast lane. Certsout is the number one choice among IT professionals. We help you do exactly that with our high-quality Exam Dumps study guide materials. If you need the latest and most updated questions and answers required then visit certsout.com because studying without dumps is not easy.

taylormckee3223612 - July 04, 2022 @ 13:23

Your posting was really beneficial to me, and I look forward to reading more of your work in the future. You can join me in playing the amazing game slope 2 unblocked if you have the time as well.

lisastelloon - September 05, 2022 @ 09:36

Useful blogs. Thanks for Sharing such kind of information with us. This post is really helpful for developers. Uptime monitoring software can enable alerts, reports, and notifications, which helps you stay informed of your network's uptime statistics.

junealexis001 - September 12, 2022 @ 12:37

Interesting site i love it keep posting more!  bathroom remodel el paso

rachebrant71 - September 16, 2022 @ 11:49

Thank you for sharing this information Keep it up. When there is a flow on the screen, such as in a video game or movie, screen tearing is often more noticeable. The various images can produce an effect on the screen that appears to be a rip or tear. If you are competitive gamer and want to know How to Set Up Nvidia G-Sync for Smooth, Tear-Free PC Gaming then go through this article. 

0