Example #1
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_Addition(formulaData1, FormulaData.op_Subtraction(FormulaData.op_Addition(FormulaData.op_UnaryNegation(this.get_L()), FormulaData.op_Multiply(FormulaData.op_Implicit(2.0), formulaData1)), FormulaData.op_Addition(FormulaData.op_UnaryNegation(this.get_H()), FormulaData.op_Multiply(FormulaData.op_Implicit(2.0), formulaData1))));

            formulaData2.Name = (__Null)"S";
            formulaData2.SetAttrs("COLOR#80C080");
            FormulaData formulaData3 = FormulaData.op_Subtraction(formulaData1, FormulaData.op_Subtraction(FormulaData.op_Addition(FormulaData.op_UnaryNegation(this.get_L()), FormulaData.op_Multiply(FormulaData.op_Implicit(2.0), formulaData1)), FormulaData.op_Addition(FormulaData.op_UnaryNegation(this.get_H()), FormulaData.op_Multiply(FormulaData.op_Implicit(2.0), formulaData1))));

            formulaData3.Name = (__Null)"R";
            formulaData3.SetAttrs("COLOR#80C080");
            FormulaData formulaData4 = this.FILLRGN(FormulaData.op_Implicit(1.0), formulaData2, formulaData3);

            formulaData4.SetAttrs("BRUSH#2000C000");
            return(new FormulaPackage(new FormulaData[3]
            {
                formulaData2,
                formulaData3,
                formulaData4
            }, ""));
        }
Example #2
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
            }, ""));
        }
Example #3
0
 public virtual FormulaPackage Run(IDataProvider dp)
 {
     this.DataProvider = (__Null)dp;
     return(new FormulaPackage(new FormulaData[1]
     {
         FormulaBase.SUM(FormulaBase.IF(this.get_ISUP(), this.get_VOL(), FormulaBase.IF(this.get_ISDOWN(), FormulaData.op_UnaryNegation(this.get_VOL()), FormulaData.op_Implicit(0.0))), 0.0)
     }, ""));
 }