Exemple #1
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
            }, ""));
        }
Exemple #2
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
            }, ""));
        }
Exemple #3
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))
            }, ""));
        }