ROBOT based on candles strategy for stock market

MQL5 エキスパート

指定

//+------------------------------------------------------------------+ //| 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); } //+-------------------------------------------------------------------------------+

応答済み

1
開発者 1
評価
(639)
プロジェクト
747
34%
仲裁
49
53% / 39%
期限切れ
14
2%
仕事中
2
開発者 2
評価
(566)
プロジェクト
863
61%
仲裁
33
27% / 45%
期限切れ
24
3%
暇
パブリッシュした人: 1 code
3
開発者 3
評価
(298)
プロジェクト
478
40%
仲裁
105
40% / 24%
期限切れ
82
17%
取り込み中
パブリッシュした人: 2 codes
4
開発者 4
評価
(28)
プロジェクト
39
23%
仲裁
14
0% / 93%
期限切れ
4
10%
暇

プロジェクト情報

予算
30+ USD
締め切り
最高 5 日