Toute amélioration sera bienvenue
Merci pour vos retours
Merci pour vos retours
La garantie Forexagone permet de vous assurer que votre gain ne soit pas perdu. Nous négocions les meilleurs taux avec les brokers agréés par l’AMF.
//+------------------------------------------------------------------+
//| SCALPING PERFECT VERSION 5.mq4 |
//| Copyright 2019, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
extern string Name_EA = "SCALPING PERFECT VERSION 5";
extern int TakeProfit = 42;
int StopLoss = 0;
extern int ecartask=14;
extern int ecartbid=0;
int MagicNumber =28012020;
extern int LotFactor=40;
int Slippage=3;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
double MyPoint=Point;
if(Digits==3 || Digits==5) MyPoint=Point*10;
//----
if(IsNewCandle())
{
return(0);
}
return(0);
}
//+------------------------------------------------------------------+
//insuring its a new candle function
//+------------------------------------------------------------------+
bool IsNewCandle()
{
static int BarsOnChart=0;
if (Bars == BarsOnChart)
return (false);
BarsOnChart = Bars;
return(true);
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
int total=OrdersTotal();
int i;
double OpenLongOrders=0,OpenShortOrders=0,PendLongs=0,PendShorts=0;
if(total==0 && OpenLongOrders==0 && OpenShortOrders==0 && PendLongs==0 && PendShorts==0)
{
sellstop();
buystop();
}
for(i=0;i<total;i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
if(OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber)
{
int type=OrderType();
if(type == OP_BUYSTOP ) {PendLongs=PendLongs+1;}
if(type == OP_SELLSTOP ) {PendShorts=PendShorts+1;}
if(total==1 && OpenLongOrders==0 && OpenShortOrders==0 && (PendLongs==1 || PendShorts==1))
{
deleteallpendingorders();
}
}
}
}
//+------------------------------------------------------------------+
//| sellstop |
//+------------------------------------------------------------------+
void sellstop()
{
int ticket =OrderSend(Symbol(),OP_SELLSTOP, (AccountEquity() * 0.01 /LotFactor),Bid-ecartbid*Point,5,(Bid-ecartbid*Point)+StopLoss*Point,(Bid-ecartbid*Point)-TakeProfit*Point,"SCALPING PERFECT VERSION 5",MagicNumber,0,clrBlue);
if (GetLastError()!=0) Print(" SELL Order Error "+(string)ticket);
}
//+------------------------------------------------------------------+
//| buystop |
//+------------------------------------------------------------------+
void buystop()
{
int ticket= OrderSend(Symbol(),OP_BUYSTOP, (AccountEquity() * 0.01 /LotFactor),Ask+ecartask*Point,5,(Ask+ecartask*Point)-StopLoss*Point,(Ask+ecartask*Point)+TakeProfit*Point,"SCALPING PERFECT VERSION 5",MagicNumber,0,clrBlue);
if (GetLastError()!=0) Print(" BUY Order Error "+(string)ticket);
}
//+------------------------------------------------------------------+
//| deleteallpendingorders |
//+------------------------------------------------------------------+
void deleteallpendingorders()
{
for(int i=0;i<OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES))
if(OrderSymbol()==Symbol() && OrderMagicNumber()==MagicNumber && ((OrderType()==OP_BUYSTOP) || (OrderType()==OP_SELLSTOP) ))
{
bool modify= OrderDelete(OrderTicket());
}
}
}
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
int TotalOrdersCount()
{
int result=0;
for(int i=0;i<OrdersTotal();i++)
{
if(OrderSelect(i,SELECT_BY_POS ,MODE_TRADES))
if (OrderMagicNumber()==MagicNumber) result++;
}
return (result);
}
du 31.01.2019 au 26.02.2019...EURUSD ...1 mn
Barres en test... 373404
Ticks modelés ...10463500
Qualité du modelage... 25.00%
Erreurs des graphiques désaccordés... 0
Dépot initial... 2000.00
Ecart Actue...l (5)
Profit total net ...1604.53
Profit brut... 1604.53
Perte brute... -0.00
Facteur de profit
Rémunération espérée... 0.02
Chute absolue... 2.50
Chute maximale... 34.03 (1.01%)
Enfoncement relatif ...1.08% (25.96)
Total des Trades... 105433
Positions SHORT (vente) gagnées %... 98220 (100.00%)
Positions LONG (achat) gagnées %... 7213 (100.00%)
Profits des Trades (% du total) ... 105433 (100.00%)
Pertes des Trades (% du total)... 0 (0.00%)
Le plus large
gains par trade... 37.38
pertes par trade... -0.00
Moyenne
gains par trade... 0.02
pertes par trade... -0.00
Maximum
gains consécutifs (profit en $)... 105433 (1604.53)
pertes consécutives (perte en $)... 0 (-0.00)
Maximum
Gains consécutifs (coups gagnants)... 1604.53 (105433)
Pertes consécutives (coups perdants)... -0.00 (0)
Moyenne
gains consécutifs... 105433
Pertes consécutives... 0
bonjour, ça à l'air hyper sympa: Je suis novice et j'aimerais le tester. Comment le télécharger? Merci