示例#1
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
            }, ""));
        }
示例#2
0
 public virtual FormulaPackage Run(IDataProvider dp)
 {
     this.DataProvider = (__Null)dp;
     return(new FormulaPackage(new FormulaData[1]
     {
         FormulaData.op_Multiply(FormulaData.op_Division(FormulaBase.COUNT(FormulaData.op_GreaterThan(this.get_CLOSE(), FormulaBase.REF(this.get_CLOSE(), 1.0)), this.N), FormulaData.op_Implicit(this.N)), FormulaData.op_Implicit(100.0))
     }, ""));
 }
示例#3
0
        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
            }, ""));
        }
示例#4
0
 public virtual FormulaPackage Run(IDataProvider dp)
 {
     this.DataProvider = (__Null)dp;
     return(new FormulaPackage(new FormulaData[1]
     {
         FormulaBase.SUM(FormulaBase.IF(FormulaData.op_GreaterThan(this.get_CLOSE(), FormulaBase.REF(this.get_CLOSE(), 1.0)), FormulaData.op_Subtraction(this.get_CLOSE(), FormulaBase.MIN(new FormulaData[2]
         {
             FormulaBase.REF(this.get_CLOSE(), 1.0),
             this.get_LOW()
         })), FormulaBase.IF(FormulaData.op_LessThan(this.get_CLOSE(), FormulaBase.REF(this.get_CLOSE(), 1.0)), FormulaData.op_Subtraction(this.get_CLOSE(), FormulaBase.MAX(new FormulaData[2]
         {
             FormulaBase.REF(this.get_CLOSE(), 1.0),
             this.get_HIGH()
         })), FormulaData.op_Implicit(0.0))), 0.0)
     }, ""));
 }
示例#5
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 = FormulaBase.ABS(FormulaData.op_Subtraction(this.get_HIGH(), formulaData1));

            formulaData2.Name = (__Null)"AA";
            FormulaData formulaData3 = FormulaBase.ABS(FormulaData.op_Subtraction(this.get_LOW(), formulaData1));

            formulaData3.Name = (__Null)"BB";
            FormulaData formulaData4 = FormulaBase.ABS(FormulaData.op_Subtraction(this.get_HIGH(), FormulaBase.REF(this.get_LOW(), 1.0)));

            formulaData4.Name = (__Null)"CC";
            FormulaData formulaData5 = FormulaBase.ABS(FormulaData.op_Subtraction(formulaData1, FormulaBase.REF(this.get_OPEN(), 1.0)));

            formulaData5.Name = (__Null)"DD";
            FormulaData formulaData6 = FormulaBase.IF(FormulaData.op_BitwiseAnd(FormulaData.op_GreaterThan(formulaData2, formulaData3), FormulaData.op_GreaterThan(formulaData2, formulaData4)), FormulaData.op_Addition(FormulaData.op_Addition(formulaData2, FormulaData.op_Division(formulaData3, FormulaData.op_Implicit(2.0))), FormulaData.op_Division(formulaData5, FormulaData.op_Implicit(4.0))), FormulaBase.IF(FormulaData.op_BitwiseAnd(FormulaData.op_GreaterThan(formulaData3, formulaData4), FormulaData.op_GreaterThan(formulaData3, formulaData2)), FormulaData.op_Addition(FormulaData.op_Addition(formulaData3, FormulaData.op_Division(formulaData2, FormulaData.op_Implicit(2.0))), FormulaData.op_Division(formulaData5, FormulaData.op_Implicit(4.0))), FormulaData.op_Addition(formulaData4, FormulaData.op_Division(formulaData5, FormulaData.op_Implicit(4.0)))));

            formulaData6.Name = (__Null)"R";
            FormulaData formulaData7 = FormulaData.op_Subtraction(FormulaData.op_Addition(FormulaData.op_Addition(FormulaData.op_Subtraction(this.get_CLOSE(), formulaData1), FormulaData.op_Division(FormulaData.op_Subtraction(this.get_CLOSE(), this.get_OPEN()), FormulaData.op_Implicit(2.0))), formulaData1), FormulaBase.REF(this.get_OPEN(), 1.0));

            formulaData7.Name = (__Null)"X";
            FormulaData formulaData8 = FormulaData.op_Multiply(FormulaData.op_Division(FormulaData.op_Multiply(FormulaData.op_Implicit(16.0), formulaData7), formulaData6), FormulaBase.MAX(new FormulaData[2]
            {
                formulaData2,
                formulaData3
            }));

            formulaData8.Name = (__Null)"SI";
            FormulaData formulaData9 = FormulaBase.SUM(formulaData8, 0.0);

            formulaData9.Name = (__Null)"ASI";
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData9
            }, ""));
        }
示例#6
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            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 = FormulaBase.MA(formulaData1, 10.0);

            formulaData3.Name = (__Null)"ADMZ";
            FormulaData formulaData4 = FormulaBase.MA(formulaData2, 10.0);

            formulaData4.Name = (__Null)"ADMF";
            FormulaData formulaData5;
            FormulaData formulaData6 = FormulaBase.IF(FormulaData.op_GreaterThan(formulaData3, formulaData4), FormulaData.op_Division(FormulaData.op_Subtraction(formulaData3, formulaData4), formulaData3), FormulaBase.IF(formulaData5 = formulaData4, FormulaData.op_Implicit(0.0), FormulaData.op_Division(FormulaData.op_Subtraction(formulaData5, formulaData4), formulaData4)));

            formulaData6.Name = (__Null)"SRDM";
            FormulaData formulaData7 = FormulaBase.SMA(formulaData6, this.N, 1.0);

            formulaData7.Name = (__Null)"ASRDM";
            return(new FormulaPackage(new FormulaData[2]
            {
                formulaData6,
                formulaData7
            }, ""));
        }
示例#7
0
        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
            }, ""));
        }
示例#8
0
        public virtual FormulaPackage Run(IDataProvider dp)
        {
            this.DataProvider = (__Null)dp;
            FormulaData formulaData = FormulaBase.REF(this.get_CLOSE(), 1.0);

            formulaData.Name = (__Null)"LC";
            return(new FormulaPackage(new FormulaData[1]
            {
                FormulaData.op_Multiply(FormulaData.op_Division(FormulaBase.SUM(FormulaBase.IF(FormulaData.op_GreaterThan(this.get_CLOSE(), formulaData), this.get_VOL(), FormulaData.op_Implicit(0.0)), this.N), FormulaBase.SUM(FormulaBase.IF(FormulaData.op_LessThanOrEqual(this.get_CLOSE(), formulaData), this.get_VOL(), FormulaData.op_Implicit(0.0)), this.N)), FormulaData.op_Implicit(100.0))
            }, ""));
        }