Is it recognizable if an order has been opened by script?

 

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.

 
HosseinKOGO:

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?
 
HosseinKOGO #:
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");
}
 
Jeremie Courchesne #:
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
 
HosseinKOGO #:
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.

 
Jeremie Courchesne #:

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.

Thank you. Does my broker recognize It was placed with script(same as EA) or not?

 
Yes it is. Wherever you execute your order from and however you do it mt5 knows.
 
Pablo Jaguanharo Carvalho Pinheiro #:
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.

 
Alain Verleyen #: Where this information come 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.

 
Fernando Carreiro #:

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.

Yes if it's done by Experts/Script, by Signals or manually, it's available on the client side too. But I never heard or saw you can discriminate an expert from a script.
 
Alain Verleyen #: Yes if it's done by Experts/Script, by Signals or manually, it's available on the client side too. But I never heard or saw you can discriminate an expert from a script.

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.

Reason: