Edit function Countorders

Spécifications

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;  


Répondu

1
Développeur 1
Évaluation
(258)
Projets
322
30%
Arbitrage
34
26% / 65%
En retard
10
3%
Travail
2
Développeur 2
Évaluation
(16)
Projets
35
23%
Arbitrage
4
0% / 50%
En retard
2
6%
Travail
3
Développeur 3
Évaluation
(102)
Projets
105
60%
Arbitrage
0
En retard
0
Gratuit
4
Développeur 4
Évaluation
(2)
Projets
5
0%
Arbitrage
3
0% / 100%
En retard
1
20%
Travail
5
Développeur 5
Évaluation
(274)
Projets
403
28%
Arbitrage
40
40% / 50%
En retard
1
0%
Gratuit
Commandes similaires
El 3aksiyat 0 35+ USD
//@version=6 indicator("منظومة El_3aksiiya 0 المتكاملة", overlay=true, max_labels_count=500, max_boxes_count=500, max_lines_count=500) // الألوان color_accum = color.new(#0000FF, 85) color_manip = color.new(#FFFF00, 80) color_dist = color.new(#FFC0CB, 80) color_elliot = #FF8C00 color_fib = #FFFF00 color_entry = #00FFFF color_tp = #00FF00 rsiVal = ta.rsi(close, 14) // نموذج AMD var int barCount = 0 if
ZigZag based on oscillators is needed The idea of ​​the indicator Create a ZigZag indicator, which is constructed based on extreme values determined using oscillators. It can use any classical normalized oscillator, which has overbought and oversold zones. The algorithm should first be executed with the WPR indicator, then similarly add the possibility to draw a zigzag using the following indicators: CCI Chaikin RSI
I am looking for an experienced MQL4/MQL5 developer to build a custom MT4 indicator from scratch or cracking my ex4 file that i provide to you. I already have an existing indicator (EX4) which produces highly accurate buy/sell signals. I want a similar indicator developed based on its observable behavior and signal structure. my existing indicator is pc id protected so you have to do PC ID security bypass and source
RSI indicator 130 - 150 USD
The Relative Strength Index (RSI) is a technical momentum indicator measuring the speed and change of price movements, scaled from 0 to 100 to identify overbought (>70) or oversold (<30) conditions. Developed by J. Welles Wilder Jr., it helps traders spot potential trend reversals or corrections.Imagine a stock, XYZ, is trending upwards.Overbought Signal: The price increases sharply, and the RSI rises to 75. This
I am looking for an experienced developer in MQL5 to build a fully AI and automated trading bot (Expert Advisor) for MetaTrader 5. The EA will trade XAUUSD only and will be based purely on price action and Smart Money Concepts (SMC), specifically focusing on liquidity sweeps, market structure shifts (MSS/CHoCH), and wick rejection entries at key points of interest (POIs). The system must follow a strict rule: no
We are looking for a developer to finish and stabilize an existing Kalshi trading bot (~60% complete) built in TypeScript. This is not a MetaTrader EA. The system interacts with the Kalshi API and requires strong understanding of execution logic, order handling, and state management. Scope of Work: Review and understand existing TypeScript codebase Complete missing functionality Fix execution issues (order placement

Informations sur le projet

Budget
30+ USD
Délais
à 1 jour(s)