Lavoro terminato
Tempo di esecuzione 4 minuti
Feedback del cliente
Experienced coder of our generation, flexible and understanding each and every details.
He is fast, faster than Japanese bullet train.
Feedback del dipendente
Excellent client
I will help him again
thank you
Specifiche
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; }
Con risposta
1
Valutazioni
Progetti
11
18%
Arbitraggio
8
38%
/
38%
In ritardo
1
9%
Gratuito
2
Valutazioni
Progetti
119
50%
Arbitraggio
4
50%
/
50%
In ritardo
3
3%
Gratuito
3
Valutazioni
Progetti
18
28%
Arbitraggio
4
50%
/
50%
In ritardo
1
6%
Gratuito
4
Valutazioni
Progetti
59
27%
Arbitraggio
26
19%
/
54%
In ritardo
10
17%
In elaborazione
Pubblicati: 1 codice
5
Valutazioni
Progetti
178
39%
Arbitraggio
4
25%
/
50%
In ritardo
14
8%
Gratuito
6
Valutazioni
Progetti
143
76%
Arbitraggio
0
In ritardo
2
1%
Gratuito
Ordini simili
I want to convert trading view pine script to mt5 expert advisor. Pine script is given below. Pine script is working very well in xauusd pair. I want same result in mt5 ea
Hey guys, I’ve been trading for 6 years now and I need to automate a strategy that is really simple and ove developed by myself. Can you help me on that? Here is my e-mail angelocherubini24@gmail.com
Hello Great Developer I am looking for a highly experienced MQL5 developer to build a production-grade Telegram to MT5 signal copier. Requirements: • <1 second execution latency (Telegram → MT5) • Intelligent signal parsing (layered entries, partial closes, BE, TP4 open trailing, modifications) • Multi-provider support (scalable to 100+) • Built-in advanced backtesting system • Configurable risk management settings •
What information would you need for Ninjatrader automated trading and approximately how long would it take ? Bill if anyone can give response here I will be glad to discuss
Khumza bot
30 - 40 USD
■Specification: Hello freelancers i need a bot.Bot requirements (MT5 EA -Extra Conservative).■Platform: MetaTrader 4/5 (PC and mobile compatible).■Markets:Forex Pairs(Gbpusd,Gbpjpy,Usdjpy),Us30,Gold,Bitcoin. ■Risk Profile(Very Conservative) ◇Risk 0.25% -0.5% per trade maximum.◇No martingale,no grid,no averaging down.◇One trade per symbol at a time. ◇Maximum 1-6 good trades per day.■STRATEGY LOGIC(All
Hello, Good programmer help in track of programmer in mql5 market sells product and give fake expert advisor see attached for name of programmer. NEEDS TO GIVE HIS CLIENT MONEY BACK OR PROVIDE THE REAL EXPERT ADVISOR Gold on the Go Experts Nguyen Hang Hai Ha Version: 1.1 Updated: 23 June 2025 Activations: 10 Expert Gold on the Go is the latest generation of automated trading robots programmed
Hello! I am looking for an experienced developer to build a robust, customizable Expert Advisor (MT4/MT5) or a standalone Python bot. The strategy is based on pure Price Action (Support & Resistance breakouts) on the XAUUSD (Gold) 30-Minute chart. It relies heavily on "human-like" chart analysis, such as looking left for targets, waiting for a price pullback (a "flip") before entering, and managing the trade based on
Acrylic-bot
30 - 800 USD
Creating this robot to help trade for you.It all about making profit. A robot that can change lives help people make profits. It’s not just a bot but the way to the future
I need very small modification in MQL4 code, details will be send for selected programmers. Source of code required. Thank you for your patience and attention, Have a nice day! I prefer programmers who will be accepting crypto payment on next project, so please write me in first message if you will be able to accept crypto in the future
Ready hft bot
100+ USD
hello great developer We want a bot like this that flips small accounts We need a bot that works live account and flips small accounts but places 2 direction buy stop and sell stop at the same time brother
Informazioni sul progetto
Budget
30+ USD