#property copyright "Copyright 2015, Hamza Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict extern string s1 = "Fast Mouving"; extern int FMperiod = 5; extern int FMshift = 0; extern int FMmethod = 0; extern int FMapplied = 0; extern string s2 = "Low Mouving"; extern int LMperiod = 14; extern int LMshift = 3; extern int LMmethod = 0; extern int LMapplied = 0; extern string s3 = "Money Manage"; extern int TP = 30; extern int SL = 10; extern double lot = 0.1; extern int magic = 12345; double t; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- double ticksize = MarketInfo (Symbol(),MODE_TICKSIZE); if ( ticksize == 0.00001 || 0.001 ) t = ticksize * 10; else t = ticksize ; //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { double Fnow = iMA(NULL,0,FMperiod,FMshift,FMmethod,FMapplied,1); double Flast = iMA(NULL,0,FMperiod,FMshift,FMmethod,FMapplied,2); double Lnow = iMA(NULL,0,LMperiod,LMshift,LMmethod,LMapplied,1); double Llast = iMA(NULL,0,LMperiod,LMshift,LMmethod,LMapplied,2); //--- if ( Fnow > Lnow && Flast < Llast ) if (OrdersTotal()==0) OrderSend(Symbol(),OP_BUY,lot,Ask,3,Ask-(SL*t),Ask+(TP*t),NULL,magic,0,Blue); if ( Fnow < Lnow && Flast > Llast ) if (OrdersTotal()==0) OrderSend(Symbol(),OP_SELL,lot,Bid,3,Bid+(SL*t),Bid-(TP*t),NULL,magic,0,Red); }
#property copyright "Copyright 2015, Hamza Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict extern string s1 = "Fast Mouving"; extern int FMperiod = 5; extern int FMshift = 0; extern int FMmethod = 0; extern int FMapplied = 0; extern string s2 = "Low Mouving"; extern int LMperiod = 14; extern int LMshift = 3; extern int LMmethod = 0; extern int LMapplied = 0; extern string s3 = "Money Manage"; extern int TP = 30; extern int SL = 10; extern double lot = 0.1; extern int magic = 12345; double t; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- double ticksize = MarketInfo (Symbol(),MODE_TICKSIZE); if ( ticksize == 0.00001 || 0.001 ) t = ticksize * 10; else t = ticksize ; //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { double Fnow = iMA(NULL,0,FMperiod,FMshift,FMmethod,FMapplied,1); double Flast = iMA(NULL,0,FMperiod,FMshift,FMmethod,FMapplied,2); double Lnow = iMA(NULL,0,LMperiod,LMshift,LMmethod,LMapplied,1); double Llast = iMA(NULL,0,LMperiod,LMshift,LMmethod,LMapplied,2); //--- if ( Fnow > Lnow && Flast < Llast ) if (OrdersTotal()==0) OrderSend(Symbol(),OP_BUY,lot,Ask,3,Ask-(SL*t),Ask+(TP*t),NULL,magic,0,Blue); if ( Fnow < Lnow && Flast > Llast ) if (OrdersTotal()==0) OrderSend(Symbol(),OP_SELL,lot,Bid,3,Bid+(SL*t),Bid-(TP*t),NULL,magic,0,Red); }
المواضيع المتشابهه | ||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
اكسبيرت تقاطع خطوط الموفينج | mohamedazam | منتدى المؤشرات و الاكسبرتات | 4 | 22 - 08 - 2018 01:41 PM |
طلب اكسبيرت تقاطع الماكد اوتوماتيكيا | murawwi | منتدى المؤشرات و الاكسبرتات | 2 | 07 - 06 - 2014 02:07 PM |
اكسبيرت تقاطع شمعة مع موفنج | prince borsa | منتدى المؤشرات و الاكسبرتات | 7 | 17 - 11 - 2013 02:30 AM |
هل يوجد اكسبيرت تنبيه تقاطع استوكاستيك | mkhalifa73 | منتدى المؤشرات و الاكسبرتات | 2 | 20 - 05 - 2012 04:18 AM |