Need a small modification for my EA

MQL4 Experts C++

Tâche terminée

Temps d'exécution 1 heure
Commentaires de l'employé
Good Customer
Commentaires du client
You are the best thanks :)

Spécifications

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);
}

Répondu

1
Développeur 1
Évaluation
(620)
Projets
680
57%
Arbitrage
25
16% / 60%
En retard
228
34%
Gratuit
2
Développeur 2
Évaluation
(590)
Projets
789
71%
Arbitrage
9
33% / 33%
En retard
22
3%
Gratuit
3
Développeur 3
Évaluation
(31)
Projets
42
26%
Arbitrage
10
20% / 50%
En retard
8
19%
Gratuit
Commandes similaires
300 usd offered - I want a developer to convert x3 pinscript indicators to Mt4 and then to Forext tester 2 which is very similar. yesterday, 16:46 MQL4 Indicators Converting Description Comments Specification I'm looking for a quote from a developer who can compile this source code as DLL file so that it works on Forex Tester 5 They are all open source trading view indicators that need to be converted to MT4 then
Build this Expert Advisor (EA) 1. Risk Management Risk per Trade : The EA will calculate the lot size based on the risk percentage (1-2% of the account balance). This will be a customizable input. Stop Loss & Trailing Stop : The EA will place a stop loss at a defined level (based on strategy parameters like ATR, recent support/resistance, etc.) and will implement a trailing stop to lock in profits as the trade moves
Hello, I have a physically trading keyboard and i want to connect it with tradelocker, mt4,mt5 and ctrader. People need to be able to open and close a position with the keyboard really fast. i need it on macos, windows and linux. (desktop) My competition is: www.magickeys.trade My goal is to be the number 1 to sell the keyboards + software. When people order a tradingkeyboard they will get a mail after the purchase
Job Title: Expert Advisor (EA) Developer for Forex Trading Job Description: I am seeking an experienced Expert Advisor (EA) developer to create a customized trading bot for the MetaTrader 4/5 platform. The bot will be designed to execute a sophisticated trading strategy that incorporates daily range calculations, cost averaging, and hedging with precise pip management. The successful candidate should have strong
I need an expert advisor based on MACD and MA signals. It must have check and handling of trade operations errors. The main criteria for opening and closing positions: ◇Both Main and Signal direction must be shown by Arrows which is going to be for buy and sell positions
I need an expert to help me with adding more features to my existing mt4 EA I think the addition I want added to this EA is fairly simple--but I don't really understand how programming works, Contact me for a long term work, This is not the only project, I will explain the features in the inbox, Let me know if you can do it
**Project Title:** Development of a Complex High-Performance EA for Step Index **Project Overview:** I need an advanced Expert Advisor (EA) for trading the Step Index on MetaTrader 5. The EA should use multiple indicators and advanced risk management techniques to enhance profitability and manage risks effectively. **Trading Strategy Details:** Indicators: - 50-period EMA - 200-period EMA - RSI with 14 periods - MACD
Hft live account 30 - 200 USD
i need a high frequency trading (hft) expert advisor, that can be used to trade on demo and live accounts icmarket and 8cap. The EA has to be highly profitable, giving daily profit. If a test version is available, please send, to foster a faster transaction. like the ones that pass prop firm and demo but adjustment where it work on live with low latency
Lihle's trades 30+ USD
``` //+------------------------------------------------------------------+ //| Hello World Expert Advisor | //| | //| This is a basic EA that buys and sells based on a simple | //| moving average crossover strategy. | //+------------------------------------------------------------------+ #property version "0.01" #property strict input int FastMA
Indicator in use: Bollinger Bands Mechanism (See diagrams provided for help) Sells: 1. Trigger candle: When candle low is above the top Bollinger band - accurate to the lowest point scale (e.g. On EURUSD if candle low is 1.07915 and the value of top bollinger is 1.07914 - this is a sell signal; or if on Futures if the increment is .25 or .10 then this is used) 2. Enter sell ONLY on the next candle if price breaks

Informations sur le projet

Budget
30+ USD
TVA (20%): 6 USD
Total: 36 USD
Pour le développeur
27 USD
Délais
à 10 jour(s)