Need a small modification for my EA

MQL4 Esperti C++

Lavoro terminato

Tempo di esecuzione 1 ora
Feedback del dipendente
Good Customer
Feedback del cliente
You are the best thanks :)

Specifiche

Hello,
the problem is the function " My_Money_Equity_Target" the value changes itself when I win a trade

Example

I enter the value 10 in my EA, if my
Account Equity is at 1000 then it will cut all my orders to 1010 and 1020 and 1030 ect
but the problem is that when I have a winning position my takeprofit is hit well my
My_Money_Equity_Target goes down to 995 because I have other open order loser,
what I would like is that my My_Money_Equity_Target only go up to the value not requested but does not go down.



Complete Code


//+------------------------------------------------------------------+
//|                    TakeProfit 1 |
//+------------------------------------------------------------------+

#property copyright ""
#property link      ""


                                       
extern double My_Money_Equity_Target=10;  
                                         
int Slippage=4;                                        
int i;

double   EquityTarget;
//+------------------------------------------------------------------+
                                  
//+------------------------------------------------------------------+
int init()
  {
//---- 
   EquityTarget = AccountEquity()+My_Money_Equity_Target;
//----
   return(0);
  }
//+------------------------------------------------------------------+
                               
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
                                         
//+------------------------------------------------------------------+


int start()
{
if (AccountEquity()>= EquityTarget)

   {
    for(i=OrdersTotal()-1;i>=0;i--)
       {
         if(OrderSelect(i,SELECT_BY_POS))
         {
            bool Res=false;
            if(OrderType()==OP_BUY)
            {
               Res = OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),Slippage,clrNONE);
            }else if(OrderType()==OP_SELL)
            {
               Res = OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),Slippage,clrNONE);
            }else
            {
               Res = OrderDelete(OrderTicket());
            }
         } 
       }
      Print ("Equity reached to ",DoubleToStr(AccountEquity(),2));
      if(!Res)    return(0);
      EquityTarget = AccountEquity()+My_Money_Equity_Target;
   }  
   
   Comment("Balance: ",AccountBalance(),", Account Equity: ",AccountEquity(),", Account Profit: ",AccountProfit(),
           "\nMy Account Equity Target: ",DoubleToStr(EquityTarget,2));
   
  return(0);
}

Con risposta

1
Sviluppatore 1
Valutazioni
(620)
Progetti
680
57%
Arbitraggio
25
16% / 60%
In ritardo
228
34%
Gratuito
2
Sviluppatore 2
Valutazioni
(590)
Progetti
789
71%
Arbitraggio
9
33% / 33%
In ritardo
22
3%
Gratuito
Pubblicati: 8 codici
3
Sviluppatore 3
Valutazioni
(31)
Progetti
42
26%
Arbitraggio
10
20% / 50%
In ritardo
8
19%
Gratuito
Ordini simili
Alphapipfx 30+ USD
Sniper Strategy EA -Presicion Forex Trading Bot for MT4 and MT5 Sniper Strategy EA is a fully automated Expert Advisor that executes high-probability forex trades using EMA 50/200 trend detection, RSI 14 momentum filtering, and automatic Support and Resistance zone identification. This bot does not chase price — it waits for price to come to key levels and confirms with multiple indicators before entering, just like
I am looking for an experienced MQL5 developer to improve an existing forex EA, not build a completely new robot from zero. Important note: I use GPT to help me write because my English is limited. The wording may be assisted by GPT, but the trading issues, testing observations, and improvement goals are real from my side. I need a developer who is patient, understands strategy logic well, and can explain the
Fair Value Gap Expert , Optimize the core logic for live chart . [Filters are working] Lets ace the trailing stop . Change points to pip . Project will start from next week
Double ma 30+ USD
Create an EA on moving averages. The EA will open a trade when the price is above the averages. It will open another when it is below the averages. Ability to work on any timeframe. Ability to use a news filter and a martingale...or to work on a grid
Project Description I am looking for a highly experienced MQL5 developer to build a professional-grade Expert Advisor for MetaTrader 5, focused on XAUUSD (Gold). This project is not a simple EA, but the foundation of a scalable multi-strategy trading system, designed for long-term development and future upgrades. Core Concept The EA must support a maximum of 5 internal strategies, each working independently but
Hi, Before ordering, I want to verify the quality of your ICT/SMC logic. Do you have an existing indicator or strategy (your own work) that I can test on TradingView? If yes, please provide: 1. A demo (invite-only script or video) 2. Proof it is NON-repainting (explained clearly) 3. Live or replay demonstration (not static screenshots) Specifically I want to see: * Clean swing structure (no consecutive highs/lows) *
Project Overview ​I am looking for a high-level Algorithmic Trader / Developer to build a sophisticated, fully automated scalping system for the Nasdaq-100 Future (NQ) . The system must integrate institutional order flow logic with market structure analysis. ​The core logic must be written in Python , acting as a central hub that bridges ATAS (as the primary data source for Order Flow) and MetaTrader 5 (as the
Hi Im working with a Crypto trading company and we want to branch out with our indicator, i'm researching the bot automation and need some hands on board. i i want to hear your opinion about the indicator that i would like you to build. in the PDF i explain the whole indicator and how it need to look like. happy to hear form you
Existing EA 30 USD
I’m looking to acquire an existing, profitable Expert Advisor (EA) with full source code to add to our client investment portfolio. To be clear, this is not a request to develop or design a new strategy. If you already have an EA that is proven, consistent, and production-ready, I’m open to reviewing it immediately. Please apply only if you meet all the requirements below. Submissions without a proper introduction or
have the Beatrix Inventor Expert Advisor (EA) that was profitable in the past but has been losing money recently. I need an experienced EA developer/optimizer to study the trade history (especially Stop Loss hits, drawdown periods, SL/TP behavior, win/loss ratio, etc.) and recommend + implement specific tweaks so it becomes consistently profitable again. Your job: 1. Deep analysis of why the EA is no longer

Informazioni sul progetto

Budget
30+ USD
Scadenze
a 10 giorno(i)