Hi pals,
I know if I open an order by EA, it is recognizable. But what about if I open orders by a one time script with a random delay? Let's say I want open 100 pending orders by running the script each one 50 ticks above last one.
No idea?
int MagicID = 123456; void OnStart() { //Send Test Orders if(OrderSend(_Symbol,OP_BUY,1.0,Ask,30,0,0,NULL,MagicID,0,clrNONE) != -1) Print("Order Send Complete."); //Count Order to See if Script Recognizes Past Opened Orders by MagicID int Count = 0; for(int i = OrdersTotal() - 1; i >= 0; i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)){ if(OrderMagicNumber() == MagicID) Count++; } else Print("OrderSelect Failed."); } //Print Results Print("Order Count is: ",(string)Count); if(Count > 1) Print("Past Orders were Recognized by Script"); }
Thank you man.
However I am asking either it is recognizable or not if we use script to open orders.
I know EA is recognizable. But have no idea about script
No Problem!
The Code I shared is a Script; it uses the OnStart() handler. (only for scripts)
OrderSend and Magic Numbers can also be used with Scripts.
Yes it is. Wherever you execute your order from and however you do it mt5 knows.
Where this information coming from ?
As far as I know there is no way, on client side neither on server side, to know if a deal was done by an Expert or a Script. The only thing available is by code or manually.
I don't know specifics, but judging by how MetaQuotes knows for Signals, when it is AlgoTrading irrespective of the magic number being 0 or not, I am going to assume that brokers probably also know this via the MetaQuotes' back-office services.
I don't know specifics, but judging by how MetaQuotes knows for Signals, when it is AlgoTrading irrespective of the magic number being 0 or not, I am going to assume that brokers probably also know this via the MetaQuotes' back-office services.
No, I did not mean knowing the difference between EA or Script or Service. I think they are all considered the same. I meant only the difference between Algo/Auto and Manual.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi pals,
I know if I open an order by EA, it is recognizable. But what about if I open orders by a one time script with a random delay? Let's say I want open 100 pending orders by running the script each one 50 ticks above last one.