Moving_expert

MQL4 Asesores Expertos

Tarea técnica

hi

this is moving expert ,and free,

is cod expert


///////////////////////////////////////////

//+------------------------------------------------------------------+

//|                                                         abed.mq4 |

//|                        Copyright 2021, MetaQuotes Software Corp. |

//|                                             https://www.mql5.com |

//+------------------------------------------------------------------+

  #property copyright "Copyright 2021, MetaQuotes Software Corp."

 #property link      "https://www.mql5.com"

 #property version   "1.00"

  #property strict

 extern double EMA_FAST=9;

 extern double EMA_MAID=12;

 extern double EMA_LONG=26;

 extern double risk=1;

 float RISK=0;

extern int TIME_TRAD=30;

 extern int TP=20;

 extern int LS=20;

 extern double LATMAX=10;

 extern double MAX=3500;

 extern double LOW=2500;


  double pt=0;

  double ma9=0;

  double ma26=0;

  double ma50=0;

  double ma100=0; 

  double ma200=0;

  double ma4=0;

  double hist,set=0;

  double profit=0;

              double lottotal;

               int contbuy,contsell; double contpofit,contbuyprofit,contsellprofit;

 string symbol,symbol2,close;

 int i1;                double Balance;

int tayp;

float lat;

float r=0;

double stoplass;

void OnInit()//---فقط موقعه راه اندازی یک بار اجرا میشود

  {

  pt=Point;

if(Digits == 3||Digits == 5)

 {

pt=pt*10;

}

Balance = AccountBalance();

MAX=MAX+Balance;

LOW=Balance - LOW;

RISK=risk/100;

  }

void start()

{


//////////////////////////////شروع برنامه ////////////////////

Sleep(1000);

i1++; if(i1>13)i1=0;

select();

conter();

//closing();

lot_total();

moving();

take();

contpofit=contbuyprofit+contsellprofit;


string str1="\n"+

            " CONT BUY = " + contbuy +  "         CONT SELL = " + contsell+

            "\n  CONT BUY PROFIT = " + contbuyprofit +     "       CONT SELL PROFIT = " + contsellprofit+

            "         TOTAL PROFIT = " +  AccountBalance()  + "    \n\n LAT_OPT = " + r+    

            "\n GetLastError = " +GetLastError() +

             "\n symbol_Teraded = "+symbol2+

                 "\n symbol_Terading ="+ symbol+

                 "\nlot_total ="+lottotal+

                 "\n closing = "+close;

                

            Comment(str1);


///////////////////////////////////////////////////////////

/////////////////////////ارسال پوزیشن اول//////////////////

replace();    


  if(OrdersTotal()<15&&StringFind(symbol2,symbol)<0&&lottotal<LATMAX)

   {      

  if(ma9>ma26&&MarketInfo(symbol,MODE_ASK)>ma9&&MarketInfo(symbol,MODE_ASK)>ma26&&ma26>ma50)//buy

  { 

      stoplass=MarketInfo(symbol,MODE_ASK)-LS*pt;

      lat_siz_opt(); 


  OrderSend(symbol,OP_BUY,r,MarketInfo(symbol,MODE_ASK),5,0,0,"buy_moving",1111,0,Blue);

  OrderSelect(OrdersTotal()-1,SELECT_BY_POS,MODE_TRADES);

  OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()-LS*pt,OrderOpenPrice()+TP*pt,0,0);

  set=0;

  } 

  //////////////////////////////////////////////////////////////////////////////////////

   if(ma9<ma26&&MarketInfo(symbol,MODE_BID)<ma9&&MarketInfo(symbol,MODE_BID)<ma26&&ma26<ma50)//sell

  {  

   stoplass=MarketInfo(symbol,MODE_BID)+LS*pt;

   lat_siz_opt();

   

  OrderSend(symbol,OP_SELL,r,MarketInfo(symbol,MODE_BID),5,0,0,"sell_moving",1111,0,Red);

  OrderSelect(OrdersTotal()-1,SELECT_BY_POS,MODE_TRADES);

  OrderModify(OrderTicket(),OrderOpenPrice(),OrderOpenPrice()+LS*pt,OrderOpenPrice()-TP*pt,0,0);

  set=0;

  }

}

}

////////////////////////////////پایان برنامه////////////////////



///////////////////////شروع توابع برنامه//////////////////////


///////////////////////محاسبه مقدار سود و ضرر///////////////

void conter()

{

contbuy=0;

contsell=0;

contpofit=0;

contbuyprofit=0;

contsellprofit=0;

for(int i=OrdersHistoryTotal()-1;i>=0;i--)

  {

   OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);

   if(OrderType()==OP_BUY)

     {

     contbuy=contbuy+1;

     contbuyprofit=contbuyprofit+OrderProfit(); 

     }

      if(OrderType()==OP_SELL)

     {

     contsell=contsell+1;

      contsellprofit=contsellprofit+OrderProfit();

     } 

  }

  

  //////////////////بستن ربات معاملاتی///////////

   if(AccountEquity()> MAX)

  {

   ExpertRemove();

  }

  if(AccountEquity()< LOW)

  {

   ExpertRemove();

  }

 }

       

//////////////////////////اصلاح استاپ لاس////////////////////////////


void closing()

{

for(int i=OrdersTotal();i>=0;i--)

  {

 OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

   if(OrderSymbol()==symbol)

     {

     moving();

       if(ma9<ma26&&OrderType()== OP_BUY)///////////////////buyclose_step1

  {

     OrderClose(i,OrderLots(),Bid,5,Aqua);

     close= OrderSymbol();

  }   

     

     

      if(ma9>ma26&&OrderType()== OP_SELL)///////////////////sellclose_step1

  {

     OrderClose(i,OrderLots(),Bid,5,Aqua); 

          close= OrderSymbol();


  }   

     }

     }

    

 }

 

////////////////////////محاسبه لات بهینه///////


double lat_siz_opt()

{

double eqaite=AccountBalance()*RISK;

double latsize=MarketInfo(symbol,MODE_LOTSIZE);

double tickt=MarketInfo(symbol,MODE_TICKVALUE); 

 r = eqaite/(MathAbs(MarketInfo(symbol,MODE_BID)-stoplass)*latsize*tickt);

  stoplass=0;

  return(r);

}


////////////////////////

void select()

{

  if(i1==1)   symbol="USDCHF"; 

   if(i1==2)   symbol="GBPUSD"; 

    if(i1==3)   symbol="EURUSD";

     if(i1==4)   symbol="USDCAD"; 

      if(i1==5)   symbol="AUDUSD"; 

       if(i1==6)   symbol="EURGBP";

        if(i1==7)   symbol="EURAUD"; 

         if(i1==8)   symbol="EURCHF"; 

          if(i1==9)   symbol="GBPCHF";

          if(i1==10)   symbol="NZDUSD"; 

          if(i1==11)    symbol="AUDNZD"; 

           if(i1==12)   symbol="AUDCHF";  

           if(i1==13)   symbol="CADCHF";


}

////////////

void replace()

{

symbol2="";

for(int i=OrdersTotal();i>=0;i--)

  {

   OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

   if(OrderMagicNumber()==1111)

     {

           StringAdd(symbol2,OrderSymbol());

                      StringAdd(symbol2,"_");

}

    

  }   

 }

 ///////////////

 void lot_total()

 {

lottotal=0;

for(int i=OrdersTotal();i>=0;i--)

  {

   OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

   

    if(OrderMagicNumber()==1111)

     {

   lottotal=lottotal+OrderLots();

   }

   }

   }

   ////////////////////////////////

   void moving()

   {

   //////////

ma9=iMA(symbol,TIME_TRAD,EMA_FAST,0,MODE_EMA,PRICE_CLOSE,0);

ma26=iMA(symbol,TIME_TRAD,EMA_MAID,0,MODE_EMA,PRICE_CLOSE,0);

ma50=iMA(symbol,TIME_TRAD,EMA_LONG,0,MODE_EMA,PRICE_CLOSE,0);

ma100=iMA(symbol,TIME_TRAD,100,0,MODE_EMA,PRICE_CLOSE,0);

   }


void take()

{


for(int i=OrdersTotal();i>=0;i--)

  {

   OrderSelect(i,SELECT_BY_POS,MODE_TRADES);

   if(OrderProfit()>20)

     {

          OrderClose(OrderTicket(),OrderLots(),Bid,5,Aqua); 



}




     }

     }





Archivos adjuntos:

Han respondido

1
Desarrollador 1
Evaluación
(4)
Proyectos
5
20%
Arbitraje
0
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(217)
Proyectos
369
33%
Arbitraje
34
41% / 29%
Caducado
108
29%
Libre
Ha publicado: 1 ejemplo
3
Desarrollador 3
Evaluación
(24)
Proyectos
28
32%
Arbitraje
1
0% / 0%
Caducado
0
Libre
Ha publicado: 1 ejemplo
4
Desarrollador 4
Evaluación
(7)
Proyectos
15
33%
Arbitraje
4
0% / 25%
Caducado
3
20%
Libre
5
Desarrollador 5
Evaluación
(568)
Proyectos
641
41%
Arbitraje
25
48% / 36%
Caducado
46
7%
Trabaja
Solicitudes similares
I need liquidity sweep indicator ready made I need, please response only if you have ready made liquidity sweep and please send me .demo for testing and please describe me logic of this liquidity sweep indicator, I am searching professional indicator
Was wondering if it’s possible for you to recreate a trading indicator that I currently use, as it’s a private script. I just need to make sure I have the complete source code and can use my own version independently. I can provide screenshots of its settings and chart signals, along with examples of how it behaves. Would this be something you’d be able to develop
Hi there I need someone who can create an ea that calculate the next price movement points if it greater then the spread cost using atr,ema, it must place an dead order meaning if the market touches it , it dead only actives in profits message of me if you understand, or if you can create it
أبحث عن مطور MQL5 ذي خبرة لإنشاء مستشار خبير (EA) مخصص يعتمد على استراتيجية محددة لتتبع الاتجاهات مع إدارة صارمة للمخاطر. 1. متطلبات استراتيجية التداول: - مرشح الاتجاه: استخدم المتوسط ​​المتحرك الأسي (EMA) لمدة 200 فترة على الإطار الزمني H1. * افتح صفقات الشراء فقط إذا كان السعر أعلى من المتوسط ​​المتحرك الأسي 200. * افتح صفقات البيع فقط إذا كان السعر أقل من المتوسط ​​المتحرك الأسي 200. - إشارة الدخول: استخدم مؤشر
Paper chaser 40 - 200 USD
//+------------------------------------------------------------------+ //| ModularMultiStrategy.mq5 | //| Copyright 2026, Financial Algo | //| https://mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026" #property link " https://mql5.com " #property version "1.00" #property strict //---
Custom MT5 Expert Advisor – Developer Specification 1. Project Objective Develop a fully autonomous, custom MetaTrader 5 Expert Advisor (EA) using native MQL5. The EA must independently analyze financial markets, generate its own trading signals, evaluate opportunities, execute trades, and manage open positions without requiring an external signal provider, another trading bot, or manual intervention. The EA must
Hello guys, I want to create a gold (xauusd)trading bot. The account balance would be €30 or €50—essentially a bot designed for a "cent account" using fixed lots, starting at a minimum lot size of 0.01. It should be a scalping bot capable of generating a daily profit of €2,000 to €3,000. As the capital grows, the lot size can be increased manually, which would, in turn, increase the profits. Is there anyone who can
Description: Hello, I need a professional, high-quality optimization of the"Ultimate SMC" Expert Advisor for MetaTrader 5. The primary objective is to create robust and safe configuration files(.set files) tailored specifically to pass the Funding Pips prop firm challenge using a cosnservative risk model. Assets and Timeframes:1.Currency Pairs: EURUSD and GBPUSD (Upon completion, I require 2 separate,independent .set
​​ Title: ​Create a Combined Indicator from 3 EX4 Indicators + Fully Automatic Trading EA (MT4) ​ Description: ​Hello, ​I need an experienced MQL4 developer to build a custom trading system based on 3 existing .ex4 indicators. ​ Project Requirements: ​ Combined Custom Indicator: ​Read and merge signals from 3 specified .ex4 indicators via buffer reading (iCustom). ​Generate a consolidated BUY or SELL arrow/signal
EA the profit 30+ USD
I need a robot that trade on command and stop-loss and take profit when need to , able to trade on all plate form follow profitable strategies or signal , want a winning streak with fast profits making

Información sobre el proyecto

Presupuesto
30+ USD