コード例 #1
0
ファイル: SlowSTO.cs プロジェクト: Bulletz4mysa/NBTrade
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData formulaData = (base.CLOSE - FormulaBase.LLV(base.LOW, this.N)) / (FormulaBase.HHV(base.HIGH, this.N) - FormulaBase.LLV(base.LOW, this.N)) * 100.0;

            formulaData.Name = "A";
            FormulaData majorLine = FormulaBase.MA(formulaData, this.M1);

            majorLine.Name = "K";
            FormulaData majorLineMA = FormulaBase.MA(majorLine, this.M2);

            majorLineMA.Name = "D";

            FormulaData overboughtThreshold = 80.0;
            FormulaData oversoldThreshold   = 20.0;

            FormulaData overboughtZone = base.FILLRGN(majorLine > overboughtThreshold, majorLine, overboughtThreshold);

            overboughtZone.SetAttrs("BRUSH#ABCE2A60"); //alpha = 00 means absolute transparent FF means solid
            FormulaData oversoldZone = base.FILLRGN(majorLine < oversoldThreshold, majorLine, oversoldThreshold);

            oversoldZone.SetAttrs("BRUSH#AB6BCE2A");

            return(new FormulaPackage(new FormulaData[]
            {
                majorLine,
                majorLineMA,
                overboughtThreshold,
                oversoldThreshold,
                overboughtZone,
                oversoldZone,
            }, ""));
        }
コード例 #2
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaBase.IF(FormulaData.op_BitwiseAnd(FormulaData.op_GreaterThanOrEqual(this.get_YEAR(), FormulaData.op_Implicit(2010.0)), FormulaData.op_GreaterThanOrEqual(this.get_MONTH(), FormulaData.op_Implicit(2.0))), FormulaData.op_Implicit(0.0), FormulaData.op_Implicit(1.0));

            formulaData1.Name = (__Null)"VAR1";
            FormulaData formulaData2 = FormulaData.op_Multiply(this.get_VOL(), this.get_C());

            formulaData2.Name = (__Null)"VAR2";
            FormulaData formulaData3 = FormulaData.op_Division(FormulaBase.EMA(formulaData2, 13.0), FormulaBase.EMA(this.get_VOL(), 13.0));

            formulaData3.Name = (__Null)"VAR3";
            FormulaData formulaData4 = FormulaData.op_Multiply(FormulaData.op_Multiply(FormulaData.op_Division(FormulaData.op_Subtraction(FormulaBase.EMA(this.get_CLOSE(), this.P1), formulaData3), formulaData3), FormulaData.op_Implicit(100.0)), formulaData1);

            formulaData4.Name = (__Null)"CYS";
            FormulaData formulaData5 = FormulaData.op_Multiply(FormulaBase.EMA(formulaData4, this.P2), formulaData1);

            formulaData5.Name = (__Null)"ML";
            FormulaData formulaData6 = FormulaData.op_Implicit(0.0);

            formulaData6.Name = (__Null)"LO";
            formulaData6.SetAttrs(" POINTDOT");
            return(new FormulaPackage(new FormulaData[3]
            {
                formulaData4,
                formulaData5,
                formulaData6
            }, ""));
        }
コード例 #3
0
ファイル: RSI.cs プロジェクト: Bulletz4mysa/NBTrade
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData formulaData = FormulaBase.REF(base.CLOSE, 1.0);

            formulaData.Name = "LC ";
            FormulaData formulaData2 = FormulaBase.SMA(FormulaBase.MAX(new FormulaData[]
            {
                base.CLOSE - formulaData,
                0.0
            }), this.N1, 1.0) / FormulaBase.SMA(FormulaBase.ABS(base.CLOSE - formulaData), this.N1, 1.0) * 100.0;

            formulaData2.Name = "RSI";
            FormulaData formulaData3 = 70.0;

            formulaData3.SetAttrs("HIGHSPEED");
            FormulaData formulaData4 = 30.0;

            formulaData4.SetAttrs("HIGHSPEED");
            FormulaData formulaData5 = base.FILLRGN(formulaData2 > 70.0, formulaData2, 70.0);

            formulaData5.SetAttrs("BRUSH#ABD930E2");////20808000");
            FormulaData formulaData6 = base.FILLRGN(formulaData2 < 30.0, formulaData2, 30.0);

            formulaData6.SetAttrs("BRUSH#AB2ACE97");//20800000");
            return(new FormulaPackage(new FormulaData[]
            {
                formulaData2,
                formulaData3,
                formulaData4,
                formulaData5,
                formulaData6
            }, ""));
        }
コード例 #4
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaBase.REF(this.get_CLOSE(), 1.0);

            formulaData1.Name = (__Null)"LC ";
            FormulaData formulaData2 = FormulaData.op_Multiply(FormulaData.op_Division(FormulaBase.SMA(FormulaBase.MAX(new FormulaData[2]
            {
                FormulaData.op_Subtraction(this.get_CLOSE(), formulaData1),
                FormulaData.op_Implicit(0.0)
            }), this.N1, 1.0), FormulaBase.SMA(FormulaBase.ABS(FormulaData.op_Subtraction(this.get_CLOSE(), formulaData1)), this.N1, 1.0)), FormulaData.op_Implicit(100.0));

            formulaData2.Name = (__Null)"RSI";
            FormulaData formulaData3 = FormulaData.op_Implicit(70.0);

            formulaData3.SetAttrs("HIGHSPEED");
            FormulaData formulaData4 = FormulaData.op_Implicit(30.0);

            formulaData4.SetAttrs("HIGHSPEED");
            FormulaData formulaData5 = this.FILLRGN(FormulaData.op_GreaterThan(formulaData2, FormulaData.op_Implicit(70.0)), formulaData2, FormulaData.op_Implicit(70.0));

            formulaData5.SetAttrs("BRUSH#20808000");
            FormulaData formulaData6 = this.FILLRGN(FormulaData.op_LessThan(formulaData2, FormulaData.op_Implicit(30.0)), formulaData2, FormulaData.op_Implicit(30.0));

            formulaData6.SetAttrs("BRUSH#20800000");
            return(new FormulaPackage(new FormulaData[5]
            {
                formulaData2,
                formulaData3,
                formulaData4,
                formulaData5,
                formulaData6
            }, ""));
        }
コード例 #5
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData = this.ZIG(3.0, this.PER);

            formulaData.SetAttrs("WIDTH2");
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData
            }, ""));
        }
コード例 #6
0
ファイル: SAR.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData = this.SAR(this.N, this.STEP, this.MAXP);

            formulaData.SetAttrs("CIRCLEDOT");
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData
            }, ""));
        }
コード例 #7
0
ファイル: VOL.cs プロジェクト: Bulletz4mysa/NBTrade
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData vol = base.VOL;

            vol.SetAttrs("VOLSTICK");
            return(new FormulaPackage(new FormulaData[]
            {
                vol
            }, "Volume"));
        }
コード例 #8
0
ファイル: BBWidth.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData = FormulaData.op_Multiply(FormulaData.op_Multiply(FormulaData.op_Implicit(this.P), FormulaBase.STD(this.get_C(), this.N)), FormulaData.op_Implicit(2.0));

            formulaData.SetAttrs("WIDTH1.6,HIGHQUALITY");
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData
            }, ""));
        }
コード例 #9
0
ファイル: ULT.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaBase.REF(this.get_C(), 1.0);

            formulaData1.Name = (__Null)"LC ";
            FormulaData formulaData2 = FormulaBase.MIN(new FormulaData[2]
            {
                this.get_L(),
                formulaData1
            });

            formulaData2.Name = (__Null)"TL ";
            FormulaData formulaData3 = FormulaData.op_Subtraction(this.get_C(), formulaData2);

            formulaData3.Name = (__Null)"BP ";
            FormulaData formulaData4 = FormulaBase.MAX(new FormulaData[3]
            {
                FormulaData.op_Subtraction(this.get_H(), this.get_L()),
                FormulaBase.ABS(FormulaData.op_Subtraction(formulaData1, this.get_H())),
                FormulaBase.ABS(FormulaData.op_Subtraction(formulaData1, this.get_L()))
            });

            formulaData4.Name = (__Null)"TR ";
            FormulaData formulaData5 = FormulaBase.MA(formulaData3, this.N1);

            formulaData5.Name = (__Null)"BPSUM1 ";
            FormulaData formulaData6 = FormulaBase.MA(formulaData3, this.N2);

            formulaData6.Name = (__Null)"BPSUM2 ";
            FormulaData formulaData7 = FormulaBase.MA(formulaData3, this.N3);

            formulaData7.Name = (__Null)"BPSUM3 ";
            FormulaData formulaData8 = FormulaBase.MA(formulaData4, this.N1);

            formulaData8.Name = (__Null)"TRSUM1 ";
            FormulaData formulaData9 = FormulaBase.MA(formulaData4, this.N2);

            formulaData9.Name = (__Null)"TRSUM2 ";
            FormulaData formulaData10 = FormulaBase.MA(formulaData4, this.N3);

            formulaData10.Name = (__Null)"TRSUM3 ";
            FormulaData formulaData11 = FormulaData.op_Addition(FormulaData.op_Addition(FormulaData.op_Multiply(FormulaData.op_Implicit(4.0), FormulaData.op_Division(formulaData5, formulaData8)), FormulaData.op_Multiply(FormulaData.op_Implicit(2.0), FormulaData.op_Division(formulaData6, formulaData9))), FormulaData.op_Division(formulaData7, formulaData10));

            formulaData11.Name = (__Null)"RAWUO ";
            FormulaData formulaData12 = FormulaData.op_Multiply(FormulaData.op_Division(formulaData11, FormulaData.op_Implicit(7.0)), FormulaData.op_Implicit(100.0));

            formulaData12.SetAttrs("WIDTH1.6,HIGHQUALITY");
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData12
            }, ""));
        }
コード例 #10
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData = this.FML(this.STOCKCODE, "C");

            formulaData.SetAttrs("FIRSTDATAOFVIEW,HIGHQUALITY");
            this.SETNAME(this.STOCKCODE);
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData
            }, ""));
        }
コード例 #11
0
ファイル: Compare.cs プロジェクト: aravinda-kumar/NBStock
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData formulaData = base.FML(this.STOCKCODE, "C");

            formulaData.SetAttrs("FIRSTDATAOFVIEW,HIGHQUALITY");
            base.SETNAME(this.STOCKCODE);
            return(new FormulaPackage(new FormulaData[]
            {
                formulaData
            }, ""));
        }
コード例 #12
0
ファイル: ZigLabel.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = this.DRAWNUMBER(this.FINDPEAK(this.get_H(), this.N), this.get_H(), this.get_H(), "F2");

            formulaData1.SetAttrs("LABEL3");
            FormulaData formulaData2 = this.DRAWNUMBER(this.FINDTROUGH(this.get_L(), this.N), this.get_L(), this.get_L(), "F2");

            formulaData2.SetAttrs("LABEL3,VALIGN2");
            return(new FormulaPackage(new FormulaData[2]
            {
                formulaData1,
                formulaData2
            }, ""));
        }
コード例 #13
0
ファイル: CMF.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaData.op_Multiply(FormulaData.op_Division(FormulaData.op_Subtraction(FormulaData.op_Subtraction(this.get_CLOSE(), this.get_LOW()), FormulaData.op_Subtraction(this.get_HIGH(), this.get_CLOSE())), FormulaData.op_Subtraction(this.get_HIGH(), this.get_LOW())), this.get_VOL());

            formulaData1.Name = (__Null)"AD";
            FormulaData formulaData2 = FormulaData.op_Division(FormulaBase.MA(formulaData1, this.N), FormulaBase.MA(this.get_VOL(), this.N));

            formulaData2.Name = (__Null)"CMF";
            formulaData2.SetAttrs("COLORSTICK");
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData2
            }, ""));
        }
コード例 #14
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaData.op_Multiply(FormulaData.op_Division(this.get_C(), this.FML(this.STOCKCODE, "C", 0, 0)), FormulaData.op_Implicit(100.0));

            formulaData1.Name = (__Null)"PR";
            formulaData1.SetAttrs("HIGHQUALITY");
            FormulaData formulaData2 = FormulaBase.EMA(formulaData1, this.N);

            return(new FormulaPackage(new FormulaData[2]
            {
                formulaData1,
                formulaData2
            }, ""));
        }
コード例 #15
0
ファイル: OBV.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaBase.SUM(FormulaBase.IF(FormulaData.op_GreaterThan(this.get_CLOSE(), FormulaBase.REF(this.get_CLOSE(), 1.0)), this.get_VOL(), FormulaBase.IF(FormulaData.op_LessThan(this.get_CLOSE(), FormulaBase.REF(this.get_CLOSE(), 1.0)), FormulaData.op_UnaryNegation(this.get_VOL()), FormulaData.op_Implicit(0.0))), 0.0);

            formulaData1.Name = (__Null)"OBV";
            formulaData1.SetAttrs("WIDTH2");
            FormulaData formulaData2 = FormulaBase.MA(formulaData1, this.N);

            formulaData2.Name = (__Null)"M";
            return(new FormulaPackage(new FormulaData[2]
            {
                formulaData1,
                formulaData2
            }, ""));
        }
コード例 #16
0
ファイル: ADX.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaBase.SUM(FormulaBase.MAX(new FormulaData[2]
            {
                FormulaBase.MAX(new FormulaData[2]
                {
                    FormulaData.op_Subtraction(this.get_HIGH(), this.get_LOW()),
                    FormulaBase.ABS(FormulaData.op_Subtraction(this.get_HIGH(), FormulaBase.REF(this.get_CLOSE(), 1.0)))
                }),
                FormulaBase.ABS(FormulaData.op_Subtraction(this.get_LOW(), FormulaBase.REF(this.get_CLOSE(), 1.0)))
            }), this.N);

            formulaData1.Name = (__Null)"TR ";
            FormulaData formulaData2 = FormulaData.op_Subtraction(this.get_HIGH(), FormulaBase.REF(this.get_HIGH(), 1.0));

            formulaData2.Name = (__Null)"HD ";
            FormulaData formulaData3 = FormulaData.op_Subtraction(FormulaBase.REF(this.get_LOW(), 1.0), this.get_LOW());

            formulaData3.Name = (__Null)"LD ";
            FormulaData formulaData4 = FormulaBase.SUM(FormulaBase.IF(FormulaData.op_BitwiseAnd(FormulaData.op_GreaterThan(formulaData2, FormulaData.op_Implicit(0.0)), FormulaData.op_GreaterThan(formulaData2, formulaData3)), formulaData2, FormulaData.op_Implicit(0.0)), this.N);

            formulaData4.Name = (__Null)"DMP";
            FormulaData formulaData5 = FormulaBase.SUM(FormulaBase.IF(FormulaData.op_BitwiseAnd(FormulaData.op_GreaterThan(formulaData3, FormulaData.op_Implicit(0.0)), FormulaData.op_GreaterThan(formulaData3, formulaData2)), formulaData3, FormulaData.op_Implicit(0.0)), this.N);

            formulaData5.Name = (__Null)"DMM";
            FormulaData formulaData6 = FormulaData.op_Division(FormulaData.op_Multiply(formulaData4, FormulaData.op_Implicit(100.0)), formulaData1);

            formulaData6.Name = (__Null)"PDI";
            this.SETNAME(formulaData6, "+DI");
            FormulaData formulaData7 = FormulaData.op_Division(FormulaData.op_Multiply(formulaData5, FormulaData.op_Implicit(100.0)), formulaData1);

            formulaData7.Name = (__Null)"MDI";
            this.SETNAME(formulaData7, "-DI");
            FormulaData formulaData8 = FormulaBase.MA(FormulaData.op_Multiply(FormulaData.op_Division(FormulaBase.ABS(FormulaData.op_Subtraction(formulaData7, formulaData6)), FormulaData.op_Addition(formulaData7, formulaData6)), FormulaData.op_Implicit(100.0)), this.N);

            formulaData8.Name = (__Null)"ADX";
            formulaData8.SetAttrs("WIDTH2");
            return(new FormulaPackage(new FormulaData[3]
            {
                formulaData6,
                formulaData7,
                formulaData8
            }, ""));
        }
コード例 #17
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaBase.MAX(new FormulaData[2]
            {
                FormulaBase.ABS(FormulaData.op_Subtraction(this.get_H(), FormulaBase.REF(this.get_H(), 1.0))),
                FormulaBase.ABS(FormulaData.op_Subtraction(this.get_L(), FormulaBase.REF(this.get_L(), 1.0)))
            }).Name = (__Null)"TR";
            FormulaData formulaData1 = FormulaBase.IF(FormulaData.op_LessThanOrEqual(FormulaData.op_Addition(this.get_H(), this.get_L()), FormulaData.op_Addition(FormulaBase.REF(this.get_H(), 1.0), FormulaBase.REF(this.get_L(), 1.0))), FormulaData.op_Implicit(0.0), FormulaBase.MAX(new FormulaData[2]
            {
                FormulaBase.ABS(FormulaData.op_Subtraction(this.get_H(), FormulaBase.REF(this.get_H(), 1.0))),
                FormulaBase.ABS(FormulaData.op_Subtraction(this.get_L(), FormulaBase.REF(this.get_L(), 1.0)))
            }));

            formulaData1.Name = (__Null)"DMZ";
            FormulaData formulaData2 = FormulaBase.IF(FormulaData.op_GreaterThanOrEqual(FormulaData.op_Addition(this.get_H(), this.get_L()), FormulaData.op_Addition(FormulaBase.REF(this.get_H(), 1.0), FormulaBase.REF(this.get_L(), 1.0))), FormulaData.op_Implicit(0.0), FormulaBase.MAX(new FormulaData[2]
            {
                FormulaBase.ABS(FormulaData.op_Subtraction(this.get_H(), FormulaBase.REF(this.get_H(), 1.0))),
                FormulaBase.ABS(FormulaData.op_Subtraction(this.get_L(), FormulaBase.REF(this.get_L(), 1.0)))
            }));

            formulaData2.Name = (__Null)"DMF";
            FormulaData formulaData3 = FormulaData.op_Division(FormulaBase.SUM(formulaData1, this.N), FormulaData.op_Addition(FormulaBase.SUM(formulaData1, this.N), FormulaBase.SUM(formulaData2, this.N)));

            formulaData3.Name = (__Null)"DIZ";
            FormulaData formulaData4 = FormulaData.op_Division(FormulaBase.SUM(formulaData2, this.N), FormulaData.op_Addition(FormulaBase.SUM(formulaData2, this.N), FormulaBase.SUM(formulaData1, this.N)));

            formulaData4.Name = (__Null)"DIF";
            FormulaData formulaData5 = FormulaData.op_Subtraction(formulaData3, formulaData4);

            formulaData5.Name = (__Null)"DDI";
            formulaData5.SetAttrs("COLORSTICK");
            FormulaData formulaData6 = FormulaBase.SMA(formulaData5, this.N1, this.M);

            formulaData6.Name = (__Null)"ADDI";
            FormulaData formulaData7 = FormulaBase.MA(formulaData6, this.M1);

            formulaData7.Name = (__Null)"AD";
            return(new FormulaPackage(new FormulaData[3]
            {
                formulaData5,
                formulaData6,
                formulaData7
            }, ""));
        }
コード例 #18
0
ファイル: MainArea.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData c = this.get_C();

            c.Name = (__Null)"MAIN ";
            c.SetAttrs("HIGHQUALITY");
            FormulaData formulaData = this.FILLAREA(c);

            formulaData.SetAttrs("BRUSH#20808000");
            this.SETTEXTVISIBLE(c, false);
            this.SETTEXTVISIBLE(false);
            return(new FormulaPackage(new FormulaData[2]
            {
                c,
                formulaData
            }, ""));
        }
コード例 #19
0
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData v = base.V;

            v.Name = "VV";
            v.SetAttrs("VOLSTICK");
            base.SETNAME(v, "");
            FormulaData formulaData = FormulaBase.MA(v, this.M1);

            formulaData.Name = "MA1";
            base.SETNAME(formulaData, "MA");
            return(new FormulaPackage(new FormulaData[]
            {
                v,
                formulaData
            }, ""));
        }
コード例 #20
0
ファイル: VOLMA.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData v = this.get_V();

            v.Name = (__Null)"VV";
            v.SetAttrs("VOLSTICK");
            this.SETNAME(v, "");
            FormulaData formulaData = FormulaBase.MA(v, this.M1);

            formulaData.Name = (__Null)"MA1";
            this.SETNAME(formulaData, "MA");
            return(new FormulaPackage(new FormulaData[2]
            {
                v,
                formulaData
            }, ""));
        }
コード例 #21
0
ファイル: MainArea.cs プロジェクト: Bulletz4mysa/NBTrade
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData c = base.C;

            c.Name = "MAIN ";
            c.SetAttrs("HIGHQUALITY");
            FormulaData formulaData = base.FILLAREA(c);

            formulaData.SetAttrs("BRUSH#20808000");
            base.SETTEXTVISIBLE(c, false);
            base.SETTEXTVISIBLE(false);
            return(new FormulaPackage(new FormulaData[]
            {
                c,
                formulaData
            }, ""));
        }
コード例 #22
0
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData formulaData = base.FML(this.INDI);
            formulaData.Name = "V1";
            formulaData.SetAttrs("HIGHQUALITY");
            FormulaData formulaData2 = base.FML(this.STOCKCODE, this.INDI);
            formulaData2.Name = "V2";
            formulaData2.SetAttrs("HIGHQUALITY");
            base.SETNAME(formulaData, base.STKLABEL);
            base.SETNAME(formulaData2, this.STOCKCODE);
            base.SETNAME(this.INDI);
            return new FormulaPackage(new FormulaData[]
			{
				formulaData, 
				formulaData2
			}, "");
        }
コード例 #23
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaBase.EMA(this.get_V(), this.N1);

            formulaData1.Name = (__Null)"E1 ";
            FormulaData formulaData2 = FormulaData.op_Multiply(FormulaData.op_Division(FormulaData.op_Subtraction(formulaData1, FormulaBase.EMA(this.get_V(), this.N2)), formulaData1), FormulaData.op_Implicit(100.0));

            formulaData2.Name = (__Null)"PVO ";
            formulaData2.SetAttrs("WIDTH1.6,HIGHQUALITY");
            FormulaData formulaData3 = FormulaBase.EMA(formulaData2, this.N3);

            formulaData3.Name = (__Null)"M ";
            return(new FormulaPackage(new FormulaData[2]
            {
                formulaData2,
                formulaData3
            }, ""));
        }
コード例 #24
0
ファイル: Fibonnaci.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaBase.HHV(this.get_H(), this.N);

            formulaData1.Name = (__Null)"A ";
            FormulaData formulaData2 = FormulaBase.LLV(this.get_L(), this.N);

            formulaData2.Name = (__Null)"B ";
            FormulaData formulaData3 = FormulaData.op_Multiply(FormulaBase.BACKSET(this.get_ISLASTBAR(), this.N), FormulaData.op_Implicit(formulaData1.get_LASTDATA()));

            formulaData3.Name = (__Null)"HH";
            formulaData3.SetAttrs("WIDTH2");
            FormulaData formulaData4 = FormulaData.op_Multiply(FormulaBase.BACKSET(this.get_ISLASTBAR(), this.N), FormulaData.op_Implicit(formulaData2.get_LASTDATA()));

            formulaData4.Name = (__Null)"LL";
            formulaData4.SetAttrs("WIDTH2");
            FormulaData formulaData5 = FormulaData.op_Subtraction(formulaData3, formulaData4);

            formulaData5.Name = (__Null)"HEIGHT ";
            FormulaData formulaData6 = FormulaData.op_Addition(formulaData4, FormulaData.op_Multiply(formulaData5, FormulaData.op_Implicit(0.382)));

            formulaData6.Name = (__Null)"A1 ";
            FormulaData formulaData7 = FormulaData.op_Addition(formulaData4, FormulaData.op_Multiply(formulaData5, FormulaData.op_Implicit(0.5)));

            formulaData7.Name = (__Null)"A2 ";
            FormulaData formulaData8 = FormulaData.op_Addition(formulaData4, FormulaData.op_Multiply(formulaData5, FormulaData.op_Implicit(0.618)));

            formulaData8.Name = (__Null)"A3 ";
            this.SETTEXTVISIBLE(formulaData3, false);
            this.SETTEXTVISIBLE(formulaData4, false);
            this.SETTEXTVISIBLE(formulaData6, false);
            this.SETTEXTVISIBLE(formulaData7, false);
            this.SETTEXTVISIBLE(formulaData8, false);
            return(new FormulaPackage(new FormulaData[5]
            {
                formulaData3,
                formulaData4,
                formulaData6,
                formulaData7,
                formulaData8
            }, ""));
        }
コード例 #25
0
ファイル: AMOUNT.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData amount = this.get_AMOUNT();

            amount.SetAttrs("VOLSTICK");
            FormulaData formulaData1 = FormulaBase.MA(this.get_AMOUNT(), this.N1);

            formulaData1.Name = (__Null)"MA1";
            FormulaData formulaData2 = FormulaBase.MA(this.get_AMOUNT(), this.N2);

            formulaData2.Name = (__Null)"MA2";
            return(new FormulaPackage(new FormulaData[3]
            {
                amount,
                formulaData1,
                formulaData2
            }, ""));
        }
コード例 #26
0
ファイル: MACD.cs プロジェクト: Bulletz4mysa/NBTrade
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData formulaData = FormulaBase.EMA(base.CLOSE, this.SHORT) - FormulaBase.EMA(base.CLOSE, this.LONG);

            formulaData.Name = "DIFF ";
            FormulaData formulaData2 = FormulaBase.EMA(formulaData, this.M);

            formulaData2.Name = "DEA  ";
            FormulaData formulaData3 = 2.0 * (formulaData - formulaData2);

            formulaData3.Name = "MACD ";
            formulaData3.SetAttrs(" COLORSTICK");
            return(new FormulaPackage(new FormulaData[3]
            {
                formulaData,
                formulaData2,
                formulaData3
            }, ""));
        }
コード例 #27
0
ファイル: VMACD.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaData.op_Subtraction(FormulaBase.EMA(this.get_VOL(), this.SHORT), FormulaBase.EMA(this.get_VOL(), this.LONG));

            formulaData1.Name = (__Null)"DIFF ";
            FormulaData formulaData2 = FormulaBase.EMA(formulaData1, this.M);

            formulaData2.Name = (__Null)"DEA  ";
            FormulaData formulaData3 = FormulaData.op_Subtraction(formulaData1, formulaData2);

            formulaData3.Name = (__Null)"MACD ";
            formulaData3.SetAttrs(" COLORSTICK");
            return(new FormulaPackage(new FormulaData[3]
            {
                formulaData1,
                formulaData2,
                formulaData3
            }, ""));
        }
コード例 #28
0
ファイル: CmpIndi.cs プロジェクト: Bulletz4mysa/NBTrade
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = this.FML(this.INDI);

            formulaData1.Name = (__Null)"V1";
            formulaData1.SetAttrs("HIGHQUALITY");
            FormulaData formulaData2 = this.FML(this.STOCKCODE, this.INDI);

            formulaData2.Name = (__Null)"V2";
            formulaData2.SetAttrs("HIGHQUALITY");
            this.SETNAME(formulaData1, this.get_STKLABEL());
            this.SETNAME(formulaData2, this.STOCKCODE);
            this.SETNAME(this.INDI);
            return(new FormulaPackage(new FormulaData[2]
            {
                formulaData1,
                formulaData2
            }, ""));
        }
コード例 #29
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData1 = FormulaData.op_Division(FormulaData.op_Addition(FormulaData.op_Addition(this.get_H(), this.get_L()), this.get_C()), FormulaData.op_Implicit(3.0));

            formulaData1.Name = (__Null)"M ";
            FormulaData formulaData2 = FormulaData.op_Subtraction(this.get_H(), this.get_L());

            formulaData2.Name = (__Null)"A ";
            FormulaData formulaData3 = FormulaData.op_Addition(formulaData1, formulaData2);

            formulaData3.Name = (__Null)"RR";
            FormulaData formulaData4 = FormulaData.op_Subtraction(formulaData1, formulaData2);

            formulaData4.Name = (__Null)"SS";
            FormulaData formulaData5 = this.DRAWAXISY(formulaData3, -10.0, 12.0);

            formulaData5.Name = (__Null)"R ";
            formulaData5.SetAttrs("WIDTH2,COLOR#A0FF0000,AXISMARGIN12");
            FormulaData formulaData6 = this.DRAWAXISY(formulaData4, -10.0, 12.0);

            formulaData6.Name = (__Null)"S ";
            formulaData6.SetAttrs("WIDTH2,COLOR#A0004000");
            FormulaData formulaData7 = this.DRAWTEXTAXISY(formulaData3, "R", 1.0);

            formulaData7.SetAttrs("COLOR#FF0000,VCENTER");
            FormulaData formulaData8 = this.DRAWTEXTAXISY(formulaData4, "S", 1.0);

            formulaData8.SetAttrs("COLOR#004000,VCENTER");
            this.SETNAME("SR");
            return(new FormulaPackage(new FormulaData[4]
            {
                formulaData5,
                formulaData6,
                formulaData7,
                formulaData8
            }, ""));
        }
コード例 #30
0
ファイル: SRAxisY.cs プロジェクト: Bulletz4mysa/NBTrade
        public override FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = dp;
            FormulaData formulaData = (base.H + base.L + base.C) / 3.0;

            formulaData.Name = "M ";
            FormulaData formulaData2 = base.H - base.L;

            formulaData2.Name = "A ";
            FormulaData formulaData3 = formulaData + formulaData2;

            formulaData3.Name = "RR";
            FormulaData formulaData4 = formulaData - formulaData2;

            formulaData4.Name = "SS";
            FormulaData formulaData5 = base.DRAWAXISY(formulaData3, -10.0, 12.0);

            formulaData5.Name = "R ";
            formulaData5.SetAttrs("WIDTH2,COLOR#A0FF0000,AXISMARGIN12");
            FormulaData formulaData6 = base.DRAWAXISY(formulaData4, -10.0, 12.0);

            formulaData6.Name = "S ";
            formulaData6.SetAttrs("WIDTH2,COLOR#A0004000");
            FormulaData formulaData7 = base.DRAWTEXTAXISY(formulaData3, "R", 1.0);

            formulaData7.SetAttrs("COLOR#FF0000,VCENTER");
            FormulaData formulaData8 = base.DRAWTEXTAXISY(formulaData4, "S", 1.0);

            formulaData8.SetAttrs("COLOR#004000,VCENTER");
            base.SETNAME("SR");
            return(new FormulaPackage(new FormulaData[]
            {
                formulaData5,
                formulaData6,
                formulaData7,
                formulaData8
            }, ""));
        }