2014.02.19 21:35:29.861 buy-with-sl EURUSD,M5: trade operations not allowed by settings

 

Hi,

my script is:

double lots = 0.1; // Lotsize


int ticket;

int start()
{
ticket=OrderSend(Symbol(), OP_BUY, lots, Bid, 3, 0, 0);
return(0);
}

it gives the error:
buy-with-sl EURUSD,M5: trade operations not allowed by settings

when i want to run it on my Chart...

why?

 
RobDust:

Hi,

my script is:

<REMOVED>

Please use the SRC button to post code . . .
 
RobDust:

Hi,

my script is:

why?

You OP_BUY at Ask not Bid . . .

Check the Return value from your OrderSend() and report errors: What are Function return values ? How do I use them ?

Did you allow live trading ?

 
GREAT! Your Screensho saved me :) works now ;)
Reason: