예제 #1
0
        // constructor, called only once, setup multiple tick variables
        public oIndicatorDump(int pPeriods)
        {
            iPeriods = pPeriods;

            ATR         = new iATR(pPeriods);
            BB          = new iBollingerBands(iPeriods, -1);
            CCI         = new iCCI(iPeriods);
            Derivatives = new iDerivatives();
            EMA         = new iEMA(iPeriods);
            FMA         = new iFMA(iPeriods);
            HMA         = new iHMA(iPeriods);
            MACD        = new iMACD(12, 26, 9);
            Momemtum    = new iMomemtum(iPeriods);
            RSI         = new iRSI(iPeriods);
            Renko       = new iRenko(iPeriods);
            SMA         = new iSMA(iPeriods);
            STARCBands  = new iSTARCBands(iPeriods, 2);
            STDDEV      = new iSTDDEV(iPeriods);
            Slope       = new iSlope();
            StochRSI    = new iStochRSI(iPeriods);
            Stochastics = new iStochastics(3, 2, 1);
            Stub        = new iStub(iPeriods);
            Trend       = new iTrend(iPeriods);
            TrueRange   = new iTrueRange();
            WMA         = new iWMA(iPeriods);
        }
예제 #2
0
        public override void Init(string pParameters)
        {
            InitializeParameters(pParameters, "SRSI:14;MINUTES:5;");

            RSIPeriods = (int)PParser.GetDouble("SRSI", 0);
            StochRSI   = new iStochRSI(RSIPeriods);
            RSISlope   = new iSlope();

            Minutes = (int)PParser.GetDouble("MINUTES", 0);
            cbx     = new cCandleBuilder(Minutes, 10);
            cbx.RegisterCandleListener("cbx", this);
            Framework.TickServer.RegisterTickListener("cbx", "*", cbx);

            Framework.TickServer.RegisterTickListener("System", "*", this);

            Framework.WriteGraphLine("StochRSI,RSISlope,InTrade,Margin");


            // this is optional
            // demonstrates we have complete control over ticks served

            LoadTicks();                        // only if specified by parameters FILE1 and FILE2
            SelectTicks();

            // this is optional
            // demonstrates registration of multiple period candles

            cb10 = new cCandleBuilder(10, 4);
            cb10.RegisterCandleListener("cb10", this);
            Framework.TickServer.RegisterTickListener("cb10", "*", cb10);
        }
예제 #3
0
        public override void Init(string pParameters)
        {
            this.InitializeParameters(pParameters, "BB:20;WIDTH:-1;HMA:10;BWT:0.0008;BWRT:0.0002;TS:0.0003;MINUTES:5;");

            State = 0;

            iPeriods            = (int)PParser.GetDouble("BB", 0);
            iWidth              = (int)PParser.GetDouble("WIDTH", 0);
            iHMALen             = (int)PParser.GetDouble("HMA", 0);
            Minutes             = (int)PParser.GetDouble("MINUTES", 0);
            BWThreshold         = PParser.GetDouble("BWT", 0);
            BWReversalThreshold = PParser.GetDouble("BWRT", 0);
            TrailingStop        = PParser.GetDouble("TS", 0);

            BBands   = new iBollingerBands(iPeriods, iWidth);
            HMA      = new iHMA(iHMALen);
            SMASlope = new iSlope();

            cbx = new cCandleBuilder(Minutes, 10);
            Framework.TickServer.RegisterTickListener("cbx", "*", cbx);
            cbx.RegisterCandleListener("cbx", this);
            Framework.TickServer.RegisterTickListener("System", "*", this);

            Framework.WriteGraphLine("InTrade,Margin,B+,C,HMA,SMA,B-,State,BWidth,MinBWidth,EntryRecommend");
        }