仕事が完了した
実行時間4 分
依頼者からのフィードバック
Experienced coder of our generation, flexible and understanding each and every details.
He is fast, faster than Japanese bullet train.
開発者からのフィードバック
Excellent client
I will help him again
thank you
指定
Anyone who can add opening direction base on moving average if its above MA must take buy trades only if below then take sell trades only. #property copyright "Copyright 2022, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.20" input bool inputOpenOppositeTradeAfterClose = true; // Open Opposite Trade After Close input ENUM_ORDER_TYPE_FILLING typeFilling = ORDER_FILLING_FOK; //Order Filling Type input int inputMaxOppositeTradePerSymbol = 3; //Max Opposite Trade Per Symbol input int slippage = 100; //Slippage In Points long MagicNumber = 163818213; bool timerCreated = false; int TIMER_FREQUENCY = 1; struct FLOATING_TRADES { ulong ticket; int tradeType; string symbol; double tradeLots; double stoploss; double takeprofit; bool oppositeAllowed; }; FLOATING_TRADES FloatingTradesArray[]; bool inititalized = false; int OnInit() { if(!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED)) { Alert("Please Allow Auto Trading"); return(INIT_FAILED); } if(!inititalized) { ArrayResize(FloatingTradesArray, 0); timerCreated = EventSetTimer(TIMER_FREQUENCY); inititalized = true; } return(INIT_SUCCEEDED); } void OnDeinit(const int reason) { switch (reason) { case REASON_CHARTCHANGE: break; case REASON_PARAMETERS: break; default: inititalized = false; EventKillTimer(); timerCreated = false; break; } } void OnTick() { if (!timerCreated) timerCreated = EventSetTimer(TIMER_FREQUENCY); } void OnTimer() { FindClosedPositions(); FindNewPositions(); } void FindNewPositions() { for(int i=PositionsTotal()-1; i>=0; i--) { ulong position_ticket=PositionGetTicket(i); ENUM_POSITION_TYPE type=(ENUM_POSITION_TYPE)PositionGetInteger(POSITION_TYPE); string symbol = PositionGetString(POSITION_SYMBOL); if(position_ticket != 0 && (type==POSITION_TYPE_BUY || type==POSITION_TYPE_SELL) && PositionGetInteger(POSITION_MAGIC) != MagicNumber) { if(CheckNewPosition(position_ticket)) { Print("position "+(string)position_ticket+" opened"); bool oppositeAllowed = CountOfTradeWithSameSymbolInArray(symbol) < inputMaxOppositeTradePerSymbol; FLOATING_TRADES newTrade; newTrade.ticket = position_ticket; newTrade.tradeType = (int)PositionGetInteger(POSITION_TYPE); newTrade.symbol = symbol; newTrade.tradeLots = PositionGetDouble(POSITION_VOLUME); newTrade.stoploss = PositionGetDouble(POSITION_SL); newTrade.takeprofit = PositionGetDouble(POSITION_TP); newTrade.oppositeAllowed = oppositeAllowed; int size = ArraySize(FloatingTradesArray); ArrayResize(FloatingTradesArray, size + 1); FloatingTradesArray[size] = newTrade; } } } } bool CheckNewPosition(ulong positionTicket) { bool result = true; for(int i=0; i<ArraySize(FloatingTradesArray); i++) { if(FloatingTradesArray[i].ticket == positionTicket) { result = false; break; } } return result; } void FindClosedPositions() { for(int i=0; i<ArraySize(FloatingTradesArray); i++) { ulong PositionTicket = FloatingTradesArray[i].ticket; ENUM_POSITION_TYPE type=(ENUM_POSITION_TYPE)FloatingTradesArray[i].tradeType; string symbol = FloatingTradesArray[i].symbol; double lot = FloatingTradesArray[i].tradeLots; double stoploss = FloatingTradesArray[i].stoploss; double takeprofit = FloatingTradesArray[i].takeprofit; bool oppositeAllowed = FloatingTradesArray[i].oppositeAllowed; if(PositionTicket != 0 && (type==POSITION_TYPE_BUY || type==POSITION_TYPE_SELL)) { if(!CheckIfPositionIsFloating(PositionTicket) && CheckPositionFromHistory(PositionTicket)) { Print("position "+(string)PositionTicket+" closed"); if(oppositeAllowed) { if(OpenOppsitePositionOpened(PositionTicket, symbol, type, lot, stoploss, takeprofit)) { Print("oppsite of position "+(string)PositionTicket+" opened"); int size = ArraySize(FloatingTradesArray); for (int j = i + 1; j < size; j++) { FloatingTradesArray[j - 1] = FloatingTradesArray[j]; } size--; ArrayResize(FloatingTradesArray, size); } } else { int size = ArraySize(FloatingTradesArray); for (int j = i + 1; j < size; j++) { FloatingTradesArray[j - 1] = FloatingTradesArray[j]; } size--; ArrayResize(FloatingTradesArray, size); } } } } } bool CheckIfPositionIsFloating(ulong PositionTicket) { bool result = false; for(int i=PositionsTotal()-1; i>=0; i--) { ulong position_ticket = PositionGetTicket(i); if(position_ticket == PositionTicket) { result = true; break; } } return result; } bool CheckPositionFromHistory(ulong positionTicket) { bool result = false; if(HistorySelectByPosition(positionTicket)) { ulong dealTicket = 0; int DealEntry; for(uint j = 0; j<2; j++) { if((dealTicket=HistoryDealGetTicket(j))>0) { DealEntry = (int)HistoryDealGetInteger(dealTicket,DEAL_ENTRY); if(DealEntry==DEAL_ENTRY_OUT) result = true; } } } return result; } bool OpenOppsitePositionOpened(long ticket, string symbol, ENUM_POSITION_TYPE positionType, double lot, double sl,double tp) { if(!inputOpenOppositeTradeAfterClose) return true; string tradeComment = "opp:"+(string)ticket; if(CheckIfPositionIsOpened(tradeComment)) return true; if(CheckIfOrderIsOpened(tradeComment)) return true; ENUM_POSITION_TYPE OppPositionType = ReversePosition(positionType); double temp = sl; sl = tp; tp = temp; if(OppPositionType == POSITION_TYPE_BUY) return OpenBuyPosition(symbol, lot, sl, tp, tradeComment); else if(OppPositionType == POSITION_TYPE_SELL) return OpenSellPosition(symbol, lot, sl, tp, tradeComment); return false; } ENUM_POSITION_TYPE ReversePosition(ENUM_POSITION_TYPE positionType) { if(positionType == POSITION_TYPE_BUY) return POSITION_TYPE_SELL; //buy reverse to sell else if(positionType == POSITION_TYPE_SELL) return POSITION_TYPE_BUY; //sell reverse to buy return positionType; } bool OpenBuyPosition(string symbol,double lot,double sl,double tp, string comment) { bool res = false; MqlTradeRequest request={}; MqlTradeResult result={}; request.action = TRADE_ACTION_DEAL; request.symbol = symbol; request.volume = lot; request.type = ORDER_TYPE_BUY; request.price = SymbolInfoDouble(symbol,SYMBOL_ASK); request.sl = sl; request.tp = tp; request.deviation = slippage; request.type_filling = typeFilling; request.comment = comment; request.magic = MagicNumber; if(!OrderSend(request,result)) { PrintFormat("OrderSend error %d",GetLastError()); res = false; } else res = true; return res; } bool OpenSellPosition(string symbol,double lot,double sl,double tp, string comment) { bool res = false; MqlTradeRequest request={}; MqlTradeResult result={}; request.action = TRADE_ACTION_DEAL; request.symbol = symbol; request.volume = lot; request.type = ORDER_TYPE_SELL; request.price = SymbolInfoDouble(symbol,SYMBOL_BID); request.sl = sl; request.tp = tp; request.deviation = slippage; request.type_filling = typeFilling; request.comment = comment; request.magic = MagicNumber; if(!OrderSend(request,result)) { PrintFormat("OrderSend error %d",GetLastError()); res = false; } else res = true; return res; } bool CheckIfPositionIsOpened(string positionComment) { bool result = false; for(int i=PositionsTotal()-1; i >= 0; i--) { ulong position_ticket=PositionGetTicket(i); string position_comment = PositionGetString(POSITION_COMMENT); if(position_comment==positionComment) { result = true; break; } } return result; } bool CheckIfOrderIsOpened(string orderComment) { bool result = false; for(int i=OrdersTotal()-1; i >= 0; i--) { ulong orderticket=OrderGetTicket(i); string order_comment = OrderGetString(ORDER_COMMENT); if(order_comment==orderComment) { result = true; break; } } return result; } int CountOfTradeWithSameSymbolInArray(string symbol) { int count = 0; for(int i=0; i<ArraySize(FloatingTradesArray); i++) { if(FloatingTradesArray[i].symbol == symbol) count++; } return count; }
応答済み
1
評価
プロジェクト
11
18%
仲裁
8
38%
/
38%
期限切れ
1
9%
暇
2
評価
プロジェクト
119
50%
仲裁
4
50%
/
50%
期限切れ
3
3%
暇
3
評価
プロジェクト
18
28%
仲裁
4
50%
/
50%
期限切れ
1
6%
暇
4
評価
プロジェクト
59
27%
仲裁
26
19%
/
54%
期限切れ
10
17%
仕事中
パブリッシュした人: 1 code
5
評価
プロジェクト
178
39%
仲裁
4
25%
/
50%
期限切れ
14
8%
暇
6
評価
プロジェクト
143
76%
仲裁
0
期限切れ
2
1%
暇
類似した注文
Hello Developers, I need a utility that allows to me open multiple positions. First the utility will show me all currency pairs on the watch list, and it will give me the option to either buy, sell, or neutral for each currency pair. Secondly, lot sizes for all currency pairs (that are not neutral) are determined through an input of cost per pip (USD). Lastly, then the execute button, which opens positions according
An expert advisor based on 15 minute candle range
50 - 100 USD
This is a reversal strategy based on the range of a 15 minute candle. Functions of the EA · Draw a range (high to low) of a specified 15 minute candle e.g. 15:00 (of course this can be 3 x 5 minute candles. The trade is taken in the 5 minute chart so this might be easier) · Compare the range of this candle to the value of the Daily ATR – the range must be a certain percentage of the Daily ATR e.g. 20%
Mt5 Scalper Ea
100+ USD
Hi i want to make Mt5 scalping ea which works on xauusd and highly profitable who have strategy please dm me and with demo version of ea so i can test and see how it works before buying it
1. Background & MQL5 Journey: ¿Cuéntame un poco sobre tu background en trading algorítmico y qué te emociona de crear EAs de alto rendimiento? 2. Experience: ¿Cuáles son 2-3 EAs destacados que has creado (mercados, Sharpe, PF, señales/backtests)? 3. Institutional Results: ¿Puedes lograr Sharpe ≥3.0, PF >2.5, <10% DD en XAUUSD? ¿Qué te da confianza? 4. Demo EA: ¿Tienes una señal de EA top (MQL5/Myfxbook) con 100+
EA for account Protection
50+ USD
Project Overview I am looking for an experienced MT5 (MQL5) developer to modify an existing Account Protection EA and, if required, extend it with custom logic. This is NOT a strategy or trading EA . The EA is purely for risk management, drawdown protection, alerts, and trading lock , suitable for prop-firm and managed accounts . Core Requirements 1. Alerts & Monitoring Alert on trade entry and trade exit Alert when
Project description: Development of a high-precision scalping Expert Advisor (EA), optimized for small capital accounts (starting from 50 USD) with 1:30 leverage on the IC Markets broker platform. The EA should be ready for use on both demo and live accounts, with pre-optimized settings, but with the flexibility to adjust all parameters. Mandatory technical requirements (all must be demonstrated in a working demo)
XML FILE-Deriv Bot
30+ USD
I need an edit and modification done to a deriv bot, who has experience in same, please reach out, Currently I have a system that only martingales on new signal but I want it immediately after a loss and then switch to ping pong
Hello 👋🙂 I need help with a very small finishing task 🧩 A previous programmer almost completed the EA , but stopped right before the finish line 🏁😅 Everything is already prepared and clear — just needs the final touch 🔧✨ This is NOT strategy work ❌🧠 The trading logic is already done, tested and working ✅ Only simple completion / cleanup needed. ✅ What’s already provided: Python source code 🐍 Exact entry &
Project Alert: MT4 Firewall EA for ECN Accounts.
40 - 55 USD
Need a pro dev to create an MT4 Expert Advisor ("Monitor EA") acting as execution firewall & auto-recovery controller for multiple EAs on XAUUSD (M1). How it works: Runs on blank chart; controls EAs via chart/template actions Closes/reopens charts to manage trades (EAs aren't editable) Targets IC Markets/VT Markets ECN Raw Source code handed over on completion Key Features:* XAUUSD (Gold) focus M1 timeframe
Apex point expert advisor
30 - 35 USD
We're looking for a highly professional MQL5 developer to create FX Apex, an advanced scalping EA optimized for small accounts ($50+), 1:30 leverage, IC Markets broker, and ready for demo/live trading. Key Features:_ Scalps XAU/USD & major pairs (M1-M15), option to add more Adaptive TP/SL based on volatility, trend, ATR, momentum Dynamic trailing, breakeven, partial close functionality Configurable risk per trade
プロジェクト情報
予算
30+ USD