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

작업 종료됨

실행 시간 41 분
고객의 피드백
Very good programmer, take a time to teach you on what modification he make :) Good teacher :) Thank you !
피고용인의 피드백
Good customer! thank you for the job!

명시

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.


파일:

MQ5
deep1.mq5
11.3 Kb

응답함

1
개발자 1
등급
(213)
프로젝트
286
47%
중재
27
59% / 37%
기한 초과
36
13%
무료
2
개발자 2
등급
(22)
프로젝트
23
39%
중재
0
기한 초과
1
4%
무료
3
개발자 3
등급
(10)
프로젝트
13
0%
중재
24
0% / 75%
기한 초과
4
31%
작업중
4
개발자 4
등급
(57)
프로젝트
72
22%
중재
13
46% / 15%
기한 초과
5
7%
무료
5
개발자 5
등급
(43)
프로젝트
66
12%
중재
12
58% / 42%
기한 초과
1
2%
무료
6
개발자 6
등급
(279)
프로젝트
378
72%
중재
19
32% / 47%
기한 초과
16
4%
무료
게재됨: 15 코드
비슷한 주문
i need some tradingview strategy that i want to use as a tester, i have something that i am working on currently and i need someone that can provide me with tradingview strategies that doesn't have a win rate, the one with 1:1 RR it need to have low win rate like 10% or 5% profitability, i am not paying $30 for,i dont have up to that for this cause i only want to use it as a test, if anyone have any to send me please
Project Description I am looking for an experienced MQL5/MT5 Expert Advisor developer to develop an automated trading EA for XAUUSD on the M3 timeframe , running on an Exness account . The EA will automate a manual strategy based on SNR/GAP zones , using two setup types: Price Rejection Price Correction The EA should identify valid BUY/SELL setups around predefined SNR/GAP areas, apply configurable RSI, SMA, EMA and

프로젝트 정보

예산
30+ USD
기한
 1 일