//+------------------------------------------------------------------+ //| boujie.mq4 | //| Copyright 2015, Hamza Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2015, Hamza Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict input string s1 = "--------------Trend--------------"; extern int TMperiod = 200; extern int TMshift = 0; extern int TMmethod = 0; extern int TMapplied = 0; input string s2 = "---------Money Management--------------"; input int TP = 30 ; input int SL = 15 ; input double lots = 0.1 ; input int Magic = 11111 ; double pclose = iClose(Symbol(),PERIOD_D1,1); double popo = iClose(Symbol(),0,1); 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 Tnow = iMA(NULL,0,TMperiod,TMshift,TMmethod,TMapplied,1); //--- if(Close[1]>High[2] ){ if(OrdersTotal()==0) bool Buy = OrderSend(NULL,OP_BUY,lots,Ask,3,Ask-(SL*t),Ask+(TP*t),NULL,Magic,0,Blue); } if(Close[1]<Low[2] ){ if(OrdersTotal()==0) bool n=OrderSend(Symbol(),OP_SELL,lots,Bid,3,Bid+(SL*t),Bid-(TP*t),NULL,Magic,0,Red); } } //+------------------------------------------------------------------+
//+------------------------------------------------------------------+ //| boujie.mq4 | //| Copyright 2015, Hamza Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2015, Hamza Corp." #property link "https://www.mql5.com" #property version "1.00" #property strict input string s1 = "--------------Trend--------------"; extern int TMperiod = 200; extern int TMshift = 0; extern int TMmethod = 0; extern int TMapplied = 0; input string s2 = "---------Money Management--------------"; input int TP = 30 ; input int SL = 15 ; input double lots = 0.1 ; input int Magic = 11111 ; double pclose = iClose(Symbol(),PERIOD_D1,1); double popo = iClose(Symbol(),0,1); 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 Tnow = iMA(NULL,0,TMperiod,TMshift,TMmethod,TMapplied,1); //--- if(Close[1]>High[2] ){ if(OrdersTotal()==0) bool Buy = OrderSend(NULL,OP_BUY,lots,Ask,3,Ask-(SL*t),Ask+(TP*t),NULL,Magic,0,Blue); } if(Close[1]<Low[2] ){ if(OrdersTotal()==0) bool n=OrderSend(Symbol(),OP_SELL,lots,Bid,3,Bid+(SL*t),Bid-(TP*t),NULL,Magic,0,Red); } } //+------------------------------------------------------------------+
أدوات الموضوع | |
المواضيع المتشابهه | ||||
الموضوع | كاتب الموضوع | المنتدى | مشاركات | آخر مشاركة |
مشكل عند إنتهاء من برمجة اكسبيرت تقاطع موفنجين | babouche | منتدى المؤشرات و الاكسبرتات | 3 | 05 - 11 - 2015 04:22 PM |
طلب برمجة اكسبيرت بسيط | faridns | منتدى المؤشرات و الاكسبرتات | 30 | 12 - 01 - 2015 03:37 PM |
طلب برمجة اكسبيرت سكاليبنج بسيط جداً | mifa8 | منتدى المؤشرات و الاكسبرتات | 34 | 22 - 09 - 2014 11:16 PM |
طلب برمجة اكسبيرت بسيط من الاخ سمير | ilhamfx | منتدى المؤشرات و الاكسبرتات | 5 | 15 - 07 - 2012 10:58 PM |
رجاء برمجة اكسبيرت بسيط | hamadov | منتدى المؤشرات و الاكسبرتات | 4 | 07 - 05 - 2012 02:50 AM |