Orders selecting by magic number(code piece only)

MQL5 Esperti Integrazione

Lavoro terminato

Tempo di esecuzione 5 ore
Feedback del cliente
10/10 . Very fast programing,great english. Good programer and even more good person, very helpfull. Recomend to everybody !
Feedback del dipendente
Very helpful and good communication.

Specifiche

Hello,

ok so my EA is working perfect but only when its operating alone. What i need is to indentify the trades made by every EA using unique magic number becouse there is no other way. So i need the peace of code with all the needed doubles if you use ones.. sorry i cannot give you my code to work on. My ea opening trades in standart way by using magic number in ordersend and before that i put it in tickets ofcourse, like in example bellow. The EA is going to work with diferend parameters in diferend pairs. The most important for me is "close all" function wich now uses all the trades wich is in acc wich is not good. i use equity stop by indentifying when to close the trades.i put some example also to better explain. So i need if conditions are happen for closing i need to do it by selecting only trades the ones that this EA made, but not as it is now (while orders is > 0) .


extern double MagicNumber=132;
int ticket;




if(x > x && ok == true && x == 0)                                        
    {
      ticket = OrderSend(Symbol(),OP_BUY, Lot,Ask,Slippage,0,0," buy",MagicNumber,0,Blue);
      OrderModify(ticket,OrderOpenPrice(),Ask-StopLoss*Point*platform_digital,Ask+TakeProfit*Point*platform_digital,0);//Modify it!
    }

{
    
if(x < x && ok == true && x == 0)                 
    {                          
      ticket = OrderSend(Symbol(),OP_SELL,Lot,Bid,Slippage,0,0," sell",MagicNumber,0,Red);
      OrderModify(ticket,OrderOpenPrice(),Bid+StopLoss*Point*platform_digital,Bid-TakeProfit*Point*platform_digital,0);//Modify it!
    }  
   }
  }
 }
} 


if(AccountEquity() >= EquityStop) // CLOSE !!!
{
while(OrdersTotal()>0)
{
OrderSelect(0,SELECT_BY_POS);
if(OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),999,Red);
if(OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),999,Orange);
if(OrderType()==OP_BUYSTOP||OrderType()==OP_SELLSTOP||OrderType()==OP_BUYLIMIT||OrderType()==OP_SELLLIMIT) OrderDelete(OrderTicket());



}
 }


One more thing, i put the ordersmax protection using very primityve algorythm, so i need fix for that also. i think it would be best to count the orders using ticket but i am not sure if the int ticket will not be the sum of all the ea runing becouse all of them have the same code. The problem is that if i limit one order per bar, and using on multiple charts and they need to open at the same time it couses the problem, other EA's will not enter becouse of restriction :


//OrderMax protection

extern double MaxOpenOrders = 1;
double o = OrdersTotal();

{
if(o >= MaxOpenOrders)
ok = false;

if(o == 0 &&  AccountEquity() <= EquityStop)   // to turn it on again if the profit has been reached with 1 order and all is closed allready
ok = true;

}


Anybody can help me?

please take this job and give me your skype, i will contact you if you really can do this.

Con risposta

1
Sviluppatore 1
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
2
Sviluppatore 2
Valutazioni
(82)
Progetti
150
29%
Arbitraggio
9
44% / 11%
In ritardo
46
31%
Gratuito
3
Sviluppatore 3
Valutazioni
(63)
Progetti
80
28%
Arbitraggio
17
12% / 76%
In ritardo
48
60%
Gratuito
4
Sviluppatore 4
Valutazioni
(550)
Progetti
829
73%
Arbitraggio
15
53% / 13%
In ritardo
193
23%
In elaborazione
5
Sviluppatore 5
Valutazioni
(71)
Progetti
254
53%
Arbitraggio
16
50% / 38%
In ritardo
83
33%
Gratuito
6
Sviluppatore 6
Valutazioni
(164)
Progetti
218
50%
Arbitraggio
6
17% / 67%
In ritardo
11
5%
Gratuito
Ordini simili
Hey there, interested in your services for merging 2 pinescripts into one Ninjatrader Strategy. I have attached both scripts below and both will be running on Renko Charts. I added entry examples in the attachment as well. For this, I would like to add some user-defined variables such as Stop Loss and Profit Targets, or allow it to sync with my ATM strategies. Please advise if this would be possible. Additional
https://github.com/theshadow76/PocketOptionAPI https://lu-yi-hsun.github.io/pocketoptionapi/ i need someone to help with with connecting to this API and recieving signals from telegram channel i have created the app but can't make it connect with SSID and start trades and veiw these trades in realtime on the app if someone can help i would be thankful telegram : @sadscan
hi, just like mt5 plateform. there is one another new platefrom called TM9 whose website is( https://trademaster9.com/site/index.html ) i want you to create an API intigration to connect mt5 or mt4 plateform to this platform. i want you to create a copy trading software which can copy trade from mt5/mt4 to trade master 9 plateform. for more information please contact me directly. PRICE CAN BE NEGOTIATED. looking
I have a python script that connects MT5 to Deriv for binary trading which is having some bug. It stops executing trades after a while. I need someone to check the code and fix it. Negotiable price
Hi I am looking for some developer, who can develop WebPage which can display my open trades position, Trade History and Live Bid/Ask of my Watchlist. Frontend web app for customers/clients where they can login and see (Account info, Watchlist, Positions, History) Control Panel to create users and map user emails to MT5 account numbers etc

Informazioni sul progetto

Budget
10 - 20 USD
Per lo sviluppatore
9 - 18 USD
Scadenze
da 1 a 8 giorno(i)