Edit function Countorders

Specification

FUNCTION 1

When I set max open orders to one it won't close the order.

Changed should work as following

When max open order is True and set to one it should still be able to close the open order.

Finish today within next hour


//+------------------------------------------------------------------+

//| Function to count orders                                         |

//+------------------------------------------------------------------+

void Count()

{

    int Bop = 0;

    int Sop = 0;

    for (int cnt = OrdersTotal() - 1; cnt >= 0; cnt--)

    {

        if (OrderSelect(cnt, SELECT_BY_POS) && OrderSymbol() == Symbol() && OrderMagicNumber() == Ii_002AC)

        {

            if (OrderType() == OP_BUY)

                Bop++;

            if (OrderType() == OP_SELL)

                Sop++;

        }

    }

}


input   int    maxtrades         = 8; // Max numbers open until close no new orders


//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

void OnTick()

  {

      if(CountOpenTrades() >= maxtrades)  return;  


Responded

1
Developer 1
Rating
(253)
Projects
316
29%
Arbitration
34
26% / 65%
Overdue
10
3%
Free
2
Developer 2
Rating
(16)
Projects
35
23%
Arbitration
4
0% / 50%
Overdue
2
6%
Working
3
Developer 3
Rating
(102)
Projects
105
60%
Arbitration
0
Overdue
0
Free
4
Developer 4
Rating
(2)
Projects
5
0%
Arbitration
3
0% / 100%
Overdue
1
20%
Working
5
Developer 5
Rating
(273)
Projects
401
27%
Arbitration
40
40% / 50%
Overdue
1
0%
Working
Similar orders
I am able to supply the source code for an MT5 indicator. I am open to the proposal to bring the project to an "alert" stage only i.e. NOT a fully functioning, independent, and automated EA. The alert function would meet all the entry and exit requirements specified - but not execute the trade. PS - I have 3 other files that will not upload. They are not essential to the scoping of the project but I can make them
I need a clear, professional, and strictly rule-based MT5 Expert Advisor. Please follow the specification below exactly as written, without adding extra logic, extra indicators, or personal modifications unless I ask for them later. The goal is to build a universal EA that can work with any custom indicator that provides signals through buffers
Hello, I need a clear, professional, and strictly rule-based MT5 Expert Advisor. Please follow the specification below exactly as written, without adding extra logic, extra indicators, or personal modifications unless I ask for them later. The goal is to build a universal EA that can work with any custom indicator that provides signals through buffers. PROJECT TITLE Universal Indicator EA for MT5 1) GENERAL IDEA The
Looking for experience profitable manual traders that will be willing to trade my live mt5 account for profit share. Requirements Must have at least 6 months of profitable months. Min 10 percent monthly Send me investor credentials for mt5 or mt4 account. Can be trading Any instruments. Must reply with mt5 credentials or will disregard
Title: Advanced Manual Hedge EA with Multiplier & Multiple Trade Support Project Requirements: I need a professional Expert Advisor (EA) for XAUUSD and Forex to manage manual trades with the following logic: Lot Multiplier: The EA must automatically detect my manual trade size. There should be a "Multiplier" input (e.g., 3.0). If I open 1.0 lot Buy, the EA must auto-place a 3.0 lot Sell Stop at the set Gap
Hello, I am looking for a professional programmer to build an EA that can be able to take trades effectively in the correct direction with adequate indices that can help to predict the market move in advance. The EA will also be able to manage multiple trades to ensure that profits activated are closed before any major market reversals. The EA will have a maximum of 3 price indices at the start, and then the
i need a developer who can link my EA to AI and in the same time i want to make a crm and a bot for onboarding clients automatically to the telegram channel
I need an Expert Advisor (EA) programmed and designed to help me with trading. Requirements: * The programmer must have experience in implementing software projects. * The code must be high-quality, clean, clear, and editable at any time, with ownership of the code provided. * It must work on MT4 and MT5 platforms. * The maximum project completion time is 3 days. * The programmer must be cooperative and flexible
I am looking for an experienced MQL5 developer to complete the optimization and structural refinement of an existing MT5 Expert Advisor (source code ~2.5MB). Phase 1 (audit and baseline testing) has already been completed. The remaining work focuses on correcting core system behavior without changing the strategy. Key issues identified: • Scenario gate logic is not correctly structured at the entry decision level •
I am looking for an experienced MQL5 developer to build a fully automated MT5 Expert Advisor based on Session Breaks and Inverted Fair Value Gap (iFVG) logic. The EA must be coded professionally, optimized for backtesting, and written with clean, organized inputs and modular code. Core Strategy The EA should: Mark previous session highs and lows Wait for the current session to break the previous session high or low

Project information

Budget
30+ USD
Deadline
to 1 day(s)