Take alook at the entire code and add 1 function to limit number of orders

İş tamamlandı

Tamamlanma süresi: 41 dakika
Müşteri tarafından geri bildirim
Very good programmer, take a time to teach you on what modification he make :) Good teacher :) Thank you !
Geliştirici tarafından geri bildirim
Good customer! thank you for the job!

Şartname

Hello, look at the entire code, check that it is programmed correctly, that there are no functions that are useless! Add a function so that there is only 1 order per currency pair. Currently it can happen that there are 2 or 3 orders per currency pair, I want to limit the number of orders to 1 per currency pair.


Add a code like this example :

int TotalOrders(string symbol="", ulong magic = -1) {

   int cnt = 0;

   int pos_total = PositionsTotal();

   for(int pos =pos_total-1;pos>=0;pos--)  {

      ulong pos_ticket = PositionGetTicket(pos);

      if(PositionSelectByTicket(pos_ticket) && (symbol=="" || PositionGetSymbol(POSITION_SYMBOL)==symbol) && ( magic==-1 || PositionGetInteger(POSITION_MAGIC)==magic) ) {

      cnt++;   

      }

   }

   return(cnt);

}


it's just an example of what I want, it can be programmed differently.


Dosyalar:

MQ5
deep1.mq5
11.3 Kb

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(210)
Projeler
282
46%
Arabuluculuk
27
59% / 37%
Süresi dolmuş
36
13%
Serbest
2
Geliştirici 2
Derecelendirme
(22)
Projeler
23
39%
Arabuluculuk
0
Süresi dolmuş
1
4%
Serbest
3
Geliştirici 3
Derecelendirme
(9)
Projeler
13
0%
Arabuluculuk
23
0% / 78%
Süresi dolmuş
4
31%
Serbest
4
Geliştirici 4
Derecelendirme
(57)
Projeler
72
22%
Arabuluculuk
13
46% / 15%
Süresi dolmuş
5
7%
Serbest
5
Geliştirici 5
Derecelendirme
(43)
Projeler
66
12%
Arabuluculuk
12
58% / 42%
Süresi dolmuş
1
2%
Serbest
6
Geliştirici 6
Derecelendirme
(278)
Projeler
373
72%
Arabuluculuk
19
32% / 47%
Süresi dolmuş
14
4%
Serbest
Yayınlandı: 14 kod
Benzer siparişler
Early Killer EA 30+ USD
It must have automated stop loss. Something that can end poverty and kill the market early.It must take the trades for me whenever I start it it must work on tradeport ea
The scanner will scan all currency base on MACD Diverdgent, my strength indicator and my better volume indicator. All this would be across all time frame and all currency pairs
Ninjatrdaer Script 500 - 1000 USD
I am looking to purchase a ninjatrader script, if there is any for sale, i mean a ready made ninjatrdaer script that trade futures, i need the seller to show me a backtest of the system, you know send some results, I would like to see a 1 year and YTD backtest
Mk 30+ USD
I need a fully automated trading robot designed to generate consistent profits while strictly controlling risk and minimizing losses. The robot should use a combination of strategies, including trend-following, scalping, and price action, and must be able to adapt to different market conditions such as trending and ranging markets. It should analyze the market using indicators like Moving Averages, RSI, MACD, and
1. IF price forms: - Higher highs + higher lows → TREND = BUY - Lower highs + lower lows → TREND = SELL ELSE → NO TRADE 2. IF: - Trend = BUY - Price retraces to support zone - Bullish engulfing candle forms - TDI green crosses above red (optional) THEN: - Execute BUY 3. IF: - Trend = SELL - Price retraces to resistance - Bearish engulfing forms - TDI confirms THEN: - Execute SELL 4. Risk per trade = 1% of account Lot

Proje bilgisi

Bütçe
30+ USD
Son teslim tarihi
to 1 gün