Orders selecting by magic number(code piece only)

MQL5 专家 积分

工作已完成

执行时间5 小时
客户反馈
10/10 . Very fast programing,great english. Good programer and even more good person, very helpfull. Recomend to everybody !
员工反馈
Very helpful and good communication.

指定

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.

反馈

1
开发者 1
等级
项目
0
0%
仲裁
0
逾期
0
空闲
2
开发者 2
等级
(82)
项目
150
29%
仲裁
9
44% / 11%
逾期
46
31%
空闲
3
开发者 3
等级
(63)
项目
80
28%
仲裁
17
12% / 76%
逾期
48
60%
空闲
4
开发者 4
等级
(550)
项目
829
73%
仲裁
15
53% / 13%
逾期
193
23%
工作中
5
开发者 5
等级
(71)
项目
254
53%
仲裁
16
50% / 38%
逾期
83
33%
空闲
6
开发者 6
等级
(164)
项目
218
50%
仲裁
6
17% / 67%
逾期
11
5%
空闲
相似订单
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

项目信息

预算
10 - 20 USD
开发人员
9 - 18 USD
截止日期
 1  8 天