|
均线价格搞定了,很笨的方法,但是能用
- int start()
- {
- if(Period()==240) h4=14;if(Period()==60) h4=56;if(Period()==15) h4=224;if(Period()==5) h4=672;if(Period()==1) h4=3360;
- if(Period()==240) h1=0;if(Period()==60) h1=14;if(Period()==15) h1=56;if(Period()==5) h1=168;if(Period()==1) h1=840;
- if(Period()==240) m15=0;if(Period()==60) m15=0;if(Period()==15) m15=14;if(Period()==5) m15=42;if(Period()==1) m15=210;
- if(Period()==240) m5=0;if(Period()==60) m5=0;if(Period()==15) m5=0;if(Period()==5) m5=14;if(Period()==1) m5=70;
- if(Period()==240) m1=0;if(Period()==60) m1=0;if(Period()==15) m1=0;if(Period()==5) m1=0;if(Period()==1) m1=14;
-
- string Market_point10 = "跟踪均线止损 价格 距离 ";
- ObjectCreate("Market_Point10_Label", OBJ_LABEL, 0, 0, 0);
- ObjectSetText("Market_Point10_Label", Market_point10, 14, FontType, clrWhite);
- ObjectSet("Market_Point10_Label", OBJPROP_CORNER, WhichCorner0_3);
- ObjectSet("Market_Point10_Label", OBJPROP_XDISTANCE, 14);
- ObjectSet("Market_Point10_Label", OBJPROP_YDISTANCE, 320);
-
- anniu("h4",clrWhite,305,365,"H 4",50);
- string Market_point6 = DoubleToStr(iMA(NULL,0,h4,0,MODE_SMA,PRICE_WEIGHTED,0),Digits);
- ObjectCreate("Market_Point6_Label", OBJ_LABEL, 0, 0, 0);
- ObjectSetText("Market_Point6_Label", Market_point6, 14, FontType, clrWhite);
- ObjectSet("Market_Point6_Label", OBJPROP_CORNER, WhichCorner0_3);
- ObjectSet("Market_Point6_Label", OBJPROP_XDISTANCE, 100);
- ObjectSet("Market_Point6_Label", OBJPROP_YDISTANCE, 365);
-
- anniu("h1",clrWhite,305,405,"H 1",50);
- string Market_point7 = DoubleToStr(iMA(NULL,0,h1,0,MODE_SMA,PRICE_WEIGHTED,0),Digits);
- ObjectCreate("Market_Point7_Label", OBJ_LABEL, 0, 0, 0);
- ObjectSetText("Market_Point7_Label", Market_point7, 14, FontType, clrWhite);
- ObjectSet("Market_Point7_Label", OBJPROP_CORNER, WhichCorner0_3);
- ObjectSet("Market_Point7_Label", OBJPROP_XDISTANCE, 100);
- ObjectSet("Market_Point7_Label", OBJPROP_YDISTANCE, 405);
-
- anniu("m15",clrWhite,305,445,"M15",50);
- string Market_point8 = DoubleToStr(iMA(NULL,0,m15,0,MODE_SMA,PRICE_WEIGHTED,0),Digits);
- ObjectCreate("Market_Point8_Label", OBJ_LABEL, 0, 0, 0);
- ObjectSetText("Market_Point8_Label", Market_point8, 14, FontType, clrWhite);
- ObjectSet("Market_Point8_Label", OBJPROP_CORNER, WhichCorner0_3);
- ObjectSet("Market_Point8_Label", OBJPROP_XDISTANCE, 100);
- ObjectSet("Market_Point8_Label", OBJPROP_YDISTANCE, 445);
-
- anniu("m5",clrWhite,305,485,"M 5",50);
- string Market_point9 = DoubleToStr(iMA(NULL,0,m5,0,MODE_SMA,PRICE_WEIGHTED,0),Digits);
- ObjectCreate("Market_Point9_Label", OBJ_LABEL, 0, 0, 0);
- ObjectSetText("Market_Point9_Label", Market_point9, 14, FontType, clrWhite);
- ObjectSet("Market_Point9_Label", OBJPROP_CORNER, WhichCorner0_3);
- ObjectSet("Market_Point9_Label", OBJPROP_XDISTANCE, 100);
- ObjectSet("Market_Point9_Label", OBJPROP_YDISTANCE, 485);
-
- anniu("m1",clrWhite,305,525,"M 1",50);
- string Market_point11 = DoubleToStr(iMA(NULL,0,m1,0,MODE_SMA,PRICE_WEIGHTED,0),Digits);
- ObjectCreate("Market_Point11_Label", OBJ_LABEL, 0, 0, 0);
- ObjectSetText("Market_Point11_Label", Market_point11, 14, FontType, clrWhite);
- ObjectSet("Market_Point11_Label", OBJPROP_CORNER, WhichCorner0_3);
- ObjectSet("Market_Point11_Label", OBJPROP_XDISTANCE, 100);
- ObjectSet("Market_Point11_Label", OBJPROP_YDISTANCE, 525);
- return(0);
- }
复制代码 |
|