I am trying to modify a basic script so that i can buy 1 lot of say usdjpy and sell 1 lot of nzdusd at the same time.
I am trying to alter the basic trade script in the mt4 platform but i dont know the syntax.
I am trying this but it doesnt seem to work- i changed SYMBOL to "USDJPY"
int start()
{
//----
int ticket=OrderSend("USDJPY",OP_BUY,1.0,Ask,3,0,0,"expert comment",255,0,CLR_NONE);
if(ticket<1)
{
int error=GetLastError();
Print("Error = ",ErrorDescription(error));
return;
}
//----
OrderPrint();
return(0);
Any ideas what i am doing wrong?
Also do i just add in the same for the sell part changing the symbol, changing buy to sell and ask to bid?
Thanks if anyone can help
Best regards Paul
I am trying to alter the basic trade script in the mt4 platform but i dont know the syntax.
I am trying this but it doesnt seem to work- i changed SYMBOL to "USDJPY"
int start()
{
//----
int ticket=OrderSend("USDJPY",OP_BUY,1.0,Ask,3,0,0,"expert comment",255,0,CLR_NONE);
if(ticket<1)
{
int error=GetLastError();
Print("Error = ",ErrorDescription(error));
return;
}
//----
OrderPrint();
return(0);
Any ideas what i am doing wrong?
Also do i just add in the same for the sell part changing the symbol, changing buy to sell and ask to bid?
Thanks if anyone can help
Best regards Paul