Mira cómo descargar robots gratis
¡Búscanos en Facebook!
Pon "Me gusta" y sigue las noticias
¿Es interesante este script?
Deje un enlace a él, ¡qué los demás también lo valoren!
¿Le ha gustado el script?
Evalúe su trabajo en el terminal MetaTrader 5
Asesores Expertos

Example of SAR Automated - with Advanced Money Management - Asesor Experto para MetaTrader 4

Mohammad Soubra
Publicado por:
Mohammed Abdulwadud Soubra
Visualizaciones:
14582
Ranking:
(13)
Publicado:
2016.05.12 14:11
Actualizado:
2016.11.22 07:32
¿Necesita un robot o indicador basado en este código? Solicítelo en la bolsa freelance Pasar a la bolsa

Real author:

Mohammad Soubra

This is not a profitable EA.

This is just a basic/simple example for coders.

This example has been built using SAR (Stop And Reverse) indicator.

With Advanced Money Management function:

//+------------------------------------------------------------------+
//    expert AdvancedMM function
//+------------------------------------------------------------------+
double AdvancedMM()
  {
   int i;
   double AdvancedMMLots=0;
   bool profit1=false;
   int SystemHistoryOrders=0;
   
   for(i=0;i<OrdersHistoryTotal();i++)
     {
      bool ordsel = OrderSelect(i,SELECT_BY_POS,MODE_HISTORY);
      if(OrderMagicNumber()==MagicNumber) SystemHistoryOrders++;
     }
     
   bool profit2=false;
   int LO=0;
   
   if(SystemHistoryOrders<2) return(Lots);
   for(i=OrdersHistoryTotal()-1;i>=0;i--)
     {
      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY))
         if(OrderMagicNumber()==MagicNumber)
           {
            if(OrderProfit()>=0 && profit1) return(Lots);
            if(LO==0)
              {
               if(OrderProfit()>=0) profit1=true;
               if(OrderProfit()<0)  return(OrderLots());
               LO=1;
              }
            if(OrderProfit()>=0 && profit2) return(AdvancedMMLots);
            if(OrderProfit()>=0) profit2=true;
            if(OrderProfit()<0)
              {
               profit1=false;
               profit2=false;
               AdvancedMMLots+=OrderLots();
              }
           }
     }
   return(AdvancedMMLots);
  }


Recommendations:

  • Take Care!
iCrosshair iCrosshair

Handy crosshair for MetaTrader 4.

QEMA percentage QEMA percentage

QEMA is the Quadruple Exponential Moving Average. With this small change you can modify the percentage of the quadruple correction respect to the normal EMA.

i-Monday_Sig i-Monday_Sig

Entry and exit signals by the "Monday" system.

i-MorningRange i-MorningRange

The morning range indicator.