Exemplo n.º 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
            }, ""));
        }
Exemplo n.º 2
0
        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
            }, ""));
        }
Exemplo n.º 3
0
 public virtual FormulaPackage Run(IDataProvider dp)
 {
     this.DataProvider = (__Null)dp;
     return(new FormulaPackage(new FormulaData[1]
     {
         FormulaBase.ABS(FormulaData.op_Subtraction(this.get_ADVANCE(), this.get_DECLINE()))
     }, ""));
 }
Exemplo n.º 4
0
 public virtual FormulaPackage Run(IDataProvider dp)
 {
     this.DataProvider = (__Null)dp;
     return(new FormulaPackage(new FormulaData[1]
     {
         FormulaData.op_Multiply(FormulaData.op_Division(FormulaBase.SMA(FormulaBase.MAX(new FormulaData[2]
         {
             FormulaData.op_Subtraction(this.get_VOL(), FormulaBase.REF(this.get_VOL(), 1.0)),
             FormulaData.op_Implicit(0.0)
         }), this.N, 1.0), FormulaBase.SMA(FormulaBase.ABS(FormulaData.op_Subtraction(this.get_VOL(), FormulaBase.REF(this.get_VOL(), 1.0))), this.N, 1.0)), FormulaData.op_Implicit(100.0))
     }, ""));
 }
Exemplo n.º 5
0
        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
            }, ""));
        }
Exemplo n.º 6
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";
            FormulaData formulaData7 = FormulaData.op_Division(FormulaData.op_Multiply(formulaData5, FormulaData.op_Implicit(100.0)), formulaData1);

            formulaData7.Name = (__Null)"MDI";
            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.M);

            formulaData8.Name = (__Null)"ADX";
            FormulaData formulaData9 = FormulaData.op_Division(FormulaData.op_Addition(formulaData8, FormulaBase.REF(formulaData8, this.M)), FormulaData.op_Implicit(2.0));

            formulaData9.Name = (__Null)"ADXR";
            return(new FormulaPackage(new FormulaData[4]
            {
                formulaData6,
                formulaData7,
                formulaData8,
                formulaData9
            }, ""));
        }
Exemplo n.º 7
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
            }, ""));
        }
Exemplo n.º 8
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";
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData2
            }, ""));
        }
Exemplo n.º 9
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.MAX(new FormulaData[3]
            {
                FormulaData.op_Subtraction(this.get_HIGH(), this.get_LOW()),
                FormulaBase.ABS(FormulaData.op_Subtraction(formulaData1, this.get_HIGH())),
                FormulaBase.ABS(FormulaData.op_Subtraction(formulaData1, this.get_LOW()))
            });

            formulaData2.Name = (__Null)"TR ";
            FormulaData formulaData3 = FormulaBase.SMA(formulaData2, this.N, 1.0);

            formulaData3.Name = (__Null)"ATR ";
            return(new FormulaPackage(new FormulaData[1]
            {
                formulaData3
            }, ""));
        }
Exemplo n.º 10
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
            }, ""));
        }
Exemplo n.º 11
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
            }, ""));
        }
Exemplo n.º 12
0
 public virtual FormulaPackage Run(IDataProvider dp)
 {
     this.DataProvider = (__Null)dp;
     return(new FormulaPackage(new FormulaData[1]
     {
         FormulaData.op_Division(FormulaData.op_Subtraction(FormulaBase.HHV(this.get_CLOSE(), this.N), FormulaBase.LLV(this.get_CLOSE(), this.N)), FormulaBase.SUM(FormulaBase.ABS(FormulaData.op_Subtraction(this.get_CLOSE(), FormulaBase.REF(this.get_CLOSE(), 1.0))), this.N))
     }, ""));
 }