仕事が完了した
実行時間7 時間
依頼者からのフィードバック
Great programmer, great thank you
開発者からのフィードバック
Good customer
指定
Hello, My EA has some takeprofit and order opening investment problems. Example: I decide that my order opens at 1.3540 on the gbpusd pair with a takeprofit of 10 pips, when the price is reached the EA opens well, but when I close my order manually and the price goes back to 1.3540 the EA opens the position but with a takeprofit over 100pips and when I close it again and the price goes back to 1.3540 it opens the order but with a takeprofit of more than 1000pips and when I close it again the EA opens no more order ... It really is
Complete Code//+------------------------------------------------------------------+ //| test35.mq4 | //| xxx | //| http://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "xxx" #property link "http://www.mql5.com" #property version "1.00" #property strict extern double lots = 0.01; extern int TakeProfit = 10; extern int StopLoss = 3000; extern int magic = 111111; extern double Level = 1.3540; extern double MaxDeviation = 9; // Max Deviation, points bool RunOnce=false; int last_order_check = false; datetime EaStartTime=TimeCurrent(); //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { RunOnce=false; MathSrand(GetTickCount()); if(Digits==5 || Digits==3) { TakeProfit *=10; StopLoss *=10; } return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnTimer() { OnTick(); } void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { if(IsLastOrderClose()) { OnInit(); Print("Ea Closed Manually "); EaStartTime=TimeCurrent(); } int ticet; int t=MathRand(); if(CountVsego()==0) { if(t>16384) { if(RunOnce || (Ask >=Level && Ask<=Level+(MaxDeviation*_Point) && Level !=0)) { ticet=OrderSend(Symbol(),OP_BUY,lots,Ask,3,Bid-StopLoss*Point,Ask+TakeProfit*Point,"1",magic,0,clrGreen); if(ticet>0) { RunOnce=true; } } } else if(t<16384) { if(RunOnce || (Bid <=Level && Bid >= Level-(MaxDeviation*_Point) && Level !=0)) { ticet=OrderSend(Symbol(),OP_SELL,lots,Bid,3,Ask+StopLoss*Point,Bid-TakeProfit*Point,"1",magic,0,clrRed); if(ticet>0) { RunOnce=true; } } } } } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int CountSELL() { int count=0; int i; for(i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderType()==OP_SELL) count++; } } return(count); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int CountBUY() { int count=0; int i; for(i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderType()==OP_BUY) count++; } } return(count); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int CountVsego() { int Vsego; Vsego=CountBUY()+CountSELL(); return(Vsego); } //+------------------------------------------------------------------+ bool IsLastOrderClose() { bool signal = false; for(int i=OrdersHistoryTotal()-1;i>=0;i--) { bool select = OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); if(select && OrderSymbol()==_Symbol && OrderMagicNumber()==magic) { if(OrderType()==OP_BUY && OrderCloseTime()>=EaStartTime) { if(OrderClosePrice()>OrderStopLoss() && OrderClosePrice()<OrderTakeProfit()) { signal = true; } break; } else if(OrderType()==OP_SELL && OrderCloseTime()>=EaStartTime) { if(OrderClosePrice()<OrderStopLoss() && OrderClosePrice()>OrderTakeProfit()) { signal = true; } break; } break; } } return(signal); }
応答済み
1
評価
プロジェクト
680
57%
仲裁
25
16%
/
60%
期限切れ
228
34%
暇
類似した注文
Hi, I am experiencing several issues with the current bot system and would like to implement a fully automated and improved version with the following features: 1. Dynamic selection of best two timeframes: • Currently, sometimes M15 gives a sell signal while M5 gives a buy signal. • I want the bot to automatically select the best two timeframes that are aligned with the SMC H1 trend to generate the signal. • This
Zaki boot
30+ USD
//+------------------------------------------------------------------+ //| XAUUSD Safe Scalp - TP $2 / SL 60 points | //+------------------------------------------------------------------+ #include <Trade\Trade.mqh> CTrade trade; // ===== Inputs ===== input double LotSize = 0.01; input int StopLoss = 60; // points input double DollarTP = 2.0; // ربح بالدولار input int MAPeriod = 50; input
Looking for an experienced MQL5 developer to analyze and reverse-engineer the trading logic of an existing scalping Zone Recovery EA using Moving Averages and Bollinger Bands, and then rebuild it
EA Expert MTA 4
30+ USD
I have my own indicator and needs to create EA expert working smoothly with it to hit the targets as defined in indicator: Technical approach: - The EA will read the indicator signals using Copy Buffer on the selected timeframe - The EA should hit indicator variable targets factor -Auto-Entry: Instant execution when the signal appears. -Alerts: Mobile Push Notifications + Pop-up alerts. -Money Management Auto-lot
I am looking for an experienced MQL5 developer to build a very fast AI-assisted scalping Expert Advisor, with special focus on XAUUSD (Gold). Core Strategy Designed mainly for XAUUSD, but should also work on all forex pairs and metals Opens multiple trades in the same direction Closes trades immediately once they are in profit (very small, fast profits) Optimized for high-speed scalping No martingale and no risky
hello great developer I’m hiring a developer to build a local-only trade copier that sends trades from MT4 and MT5 to NinjaTrader 8 (NT8) in real-time. This copier must be reliable, fast, and fully executable without cloud dependence. I require a short test/demo period before full delivery to ensure quality and performance. here is the full project specs in the file check it please
I need a reliable, clean-coded Expert Advisor built for both MetaTrader 4 and MetaTrader 5 platforms. Main trading behavior: The EA follows buy and sell arrows produced by my custom indicator. Whenever a buy arrow shows up on the chart: if a sell position is currently open → close that sell immediately and enter a buy trade in its place. Whenever a sell arrow appears: if a buy position exists → close the buy and
CONVERTER ROBOT TO MQL5
30 - 40 USD
Hello I'm looking for professional to create a robot to me that will enter us30 or nasdaq around 16H29-minute55-Second New York session opening Monday to Friday and put stop loss 3800 points away from entry hedging strategy
Custom MT5 Expert Advisor Development
30 - 200 USD
*I am looking for an experienced MQL5 developer to build a custom Expert Advisor (EA) for MetaTrader 5 based on my proprietary trading strategy. The full strategy details will be shared privately with the selected developer after agreement. The EA must be designed for automated trade execution with a strong focus on accuracy, speed, and stability. It should support flexible input settings and allow for future
📋 Project Description I am looking for an experienced MT5 (MQL5) developer to code a fully automated Expert Advisor for NASDAQ (US100) based on a fixed, rule-based opening range breakout strategy. The strategy is mechanical, uses no discretionary logic, and must be coded exactly as specified below. 🕒 Time & Session Rules Market: NASDAQ (US100) Trading days: Monday–Friday Session open: 9:30 EST EA must convert
プロジェクト情報
予算
30+ USD