ROBOT based on candles strategy for stock market

MQL5 Experts

Spécifications

//+------------------------------------------------------------------+ //| Gold_Grid_Secure.mq5 | //| Stratégie GRID SÉCURISÉE pour XAUUSDm | //+------------------------------------------------------------------+ #property strict //--- INPUTS PARAMÈTRES SÉCURISÉS input double LotDepart = 0.01; // Lot de départ input double GridStep = 1000; // Écart entre trades = 1000 points = 10$ sur or input int MaxTrades = 8; // Nombre max de trades ouverts input double TP_Global = 20.0; // Take Profit Global en $ input double SL_Global = -20.0; // Stop Loss Global en $ - SÉCURITÉ input int MagicNumber = 12345; // Numéro magique //--- VARIABLE GLOBALE double profit_total = 0; //+------------------------------------------------------------------+ int OnInit() { Print("EA Gold Grid Sécurisé Démarré"); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ void OnTick() { // 1. CALCUL PROFIT TOTAL DE TOUS LES TRADES DU ROBOT profit_total = 0; for(int i=0; i= TP_Global || profit_total = last_buy_price + GridStep * _Point) OpenTrade(ORDER_TYPE_BUY); // Si prix descend de 10$ → nouveau Sell if(_Bid =0; i--) { if(PositionGetSymbol(i) == _Symbol && PositionGetInteger(POSITION_MAGIC) == MagicNumber) { MqlTradeRequest request; MqlTradeResult result; ZeroMemory(request); request.action = TRADE_ACTION_DEAL; request.position = PositionGetInteger(POSITION_TICKET); request.volume = PositionGetDouble(POSITION_VOLUME); request.type = (PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY) ? ORDER_TYPE_SELL : ORDER_TYPE_BUY; request.price = (request.type==ORDER_TYPE_BUY) ? SymbolInfoDouble(_Symbol,SYMBOL_ASK) : SymbolInfoDouble(_Symbol,SYMBOL_BID); OrderSend(request,result); } } } //+------------------------------------------------------------------+ int CountTrades() { int count=0; for(int i=0; i=0; i--) if(PositionGetSymbol(i) == _Symbol && PositionGetInteger(POSITION_MAGIC) == MagicNumber && PositionGetInteger(POSITION_TYPE)==type) price = PositionGetDouble(POSITION_PRICE_OPEN); return(price); } //+-------------------------------------------------------------------------------+

Répondu

1
Développeur 1
Évaluation
(621)
Projets
724
34%
Arbitrage
47
47% / 40%
En retard
14
2%
Chargé
2
Développeur 2
Évaluation
(555)
Projets
847
61%
Arbitrage
33
27% / 45%
En retard
24
3%
Gratuit
Publié : 1 code

Informations sur le projet

Budget
30+ USD
Délais
à 5 jour(s)

Client

Commandes passées1
Nombre d'arbitrages0