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
Looking for a Powerful MT5 Trading Strategy or Custom EA?
1000 - 1200 USD
Do you need a profitable and well-structured trading strategy converted into a fully automated Expert Advisor on the MT5 platform? I specialize in developing advanced, high-performance EAs with: ✅ Smart entry & exit logic ✅ Risk-based lot size calculation ✅ Break-even & trailing stop system ✅ Spread & session filters ✅ Daily drawdown protection ✅ Prop firm (FTMO-style) risk compliance ✅ Fully automated trade
Are you tired of sitting in front of the charts for hours, only to end the day with more losses than win ? Most traders fail because they rely on emotions, inconsistent strategies, and sleepless nights trying to rims the market, That's why we created an advanced Forex trading robot designed to create smarter, faster and more efficiently than any human ever. Here is what you will get: Already made automated trading
Hello, I'm looking to find out the cost of creating a mobile trading robot. I've tried to describe it as thoroughly as possible in the following document. I look forward to your response. I'd like to know the costs, delivery time, and how you plan to implement it before making a decision
I have an existing MT5 Expert Advisor (“E-Core”). I need an experienced MQL5 developer to integrate a structured risk management upgrade and a higher timeframe trend filter into the current code. Two files will be provided: 1️⃣ E-Core Source Code (Current Version) 2️⃣ Update Instructions File (contains exact inputs, functions, and logic to integrate) The developer must: Integrate the update logic
Gunts
30 - 50 USD
Modification of EA and addition of tradovate indicators to mt5 EA as part of signal generation. To improve entry, display and management of trades in my EA using signals from tradovate indicators count
DO NOT RESPOND TO WORK WITH ANY AI. ( I CAN ALSO DO THAT ) NEED REAL DEVELOPING SKILL Hedge Add-On Rules for Existing EA Core Idea SL becomes hypothetical (virtual) for the initial basket and for the hedge basket . When price hits the virtual SL level , EA does not close the losing trades. Instead, EA opens one hedge basket in the opposite direction. Original basket direction Hedge basket direction (opposite) Inputs
Billionflow
30 - 100 USD
Trading specifications: Indicators: Bollinger band ( Period 40, Deviation 1 apply to close) Moving Average (Exponential ) Period 17 applied to high Moving Average ( Exponential ) Period 17 applied to low But Signal enter a buy trade when prices crosses the lower band of the bollinger band up and also crosses the moving average channel of high and low the reverse is true for sell signal
Hello, I am a user of the "BUY STOP SELL STOP V6" trading bot, which is an advanced Grid System bot. The bot is primarily designed for Gold (XAUUSD), but I want it to work on all currency pairs. "The bot contains a privacy/protection code that prevents it from running on other accounts or being modified on any platform, as it has a client account number lock mechanism" --- Bot Description & Current Settings Bot Type
DOUBLE STEP MA WITH SUPERTREND
60+ USD
Kindly see details below BUY ALERT 1. Supertrend turns Bullish 2. On this candle , or the last 10, BBStops is Bearish 3. On this candle , or the last 10, price was < or = MA1 4. Instrument is in trend (STEP MA1 and STEP MA 2 are both Bullish) 5. Distance in pips between Lowest price during last time BBstop was Bearish, and the value of Step MA 1 at last bearish candle of Step MA1
Looking to purchase a Good forex or gold/ BTC trading EA and it's source code. Must be compatible with low budget like less than $500 accounts, Must need no manual intervention and run fully automated. If you are interested in selling me the source code, please share the Read only account access where the EA has already been running on, so i can check past performance and get an idea on how it works or runs. Dont
Informazioni sul progetto
Budget
30+ USD