Allow autotrading?

 

I have experienced 2 similar problems with autotrading.

The original multicorrency sample get a reply of not allowed when asking if autotrading is allowed. I commented out the test and everything worked fine

on another test I get error 1006 "Autotrading disabled by server" when the ea tries to place a trade.  In both cases I have the button "autotraqding set to allowed and all correct settings

in "Tools" "Trading"  Build 871


Edited.

On further investigation it looks like it is the test that provides the wrong answer.


in the MultiCurrEA I tried this request:

   if(AccountInfoInteger(ACCOUNT_TRADE_EXPERT))

      Print("Automated trading is allowed on the account?")

In the original version the test was formulated differently. I checked the manual since the original code gave the wrong answer.

So I changed the code to the one above.

The original request looked like:

   if(AccountInfo.TradeExpert())
      Print("Automated trading is allowed on the account");
   else
     {
      Print("Automated trading using EAs or scripts is not allowed");
      ExpertRemove();
     }

Both types of request reurned that autotrading was not allowed even if it is.

I commented out the test and the EA worked. Now I get the same type of message;

CTrade::OderSend: [autotrading disabled by server]


It definitely looks like CTrade perform some similar test and also gets the wrong answer, But not every time

 
ingvar_e:

The problem isn't the EA, the problem is your settings. You have to enable AutoTrading as a general settings (AutoTrading Button in toolbar)

AND

enabled autotrading for the EA, in common tab of the EA properties.

Anyway it's now week-end and your broker certainly don't allow trading at all.

 
angevoyageur:

The problem isn't the EA, the problem is your settings. You have to enable AutoTrading as a general settings (AutoTrading Button in toolbar)

AND

enabled autotrading for the EA, in common tab of the EA properties.

Anyway it's now week-end and your broker certainly don't allow trading at all.

   The button is set forAutotrading.

   All the correct flags are set in Tools, Option, Expert Advisors.

   Autotrading is set in the common tab

   The last  problem occured on Friday, early afternoon.  GMT

   For testing if Auttrading is allowed, which one of the 2 methods above do you recommend?

 
ingvar_e:

   The button is set forAutotrading.

   All the correct flags are set in Tools, Option, Expert Advisors.

   Autotrading is set in the common tab

   The last  problem occured on Friday, early afternoon.  GMT

   For testing if Auttrading is allowed, which one of the 2 methods above do you recommend?

They are the same, one with oop, other without. If that still doesn't work when market is open i suggest you to contact your broker.

 
angevoyageur:

They are the same, one with oop, other without. If that still doesn't work when market is open i suggest you to contact your broker.

  OK, thanks. I will do that
 
ingvar_e:
  OK, thanks. I will do that
  Emailed Alpari UK. Prompt answer. They turned it on. When asked how come it was like that they said that it was an automatic feature that for some reason had not been turned on.
Reason: