Hi i am near thed of my first ea (it has been painful ) and thank you for those who help me.
I am trying to demo the ea and get this error opening sell order - 131
The funtion is below:- i am trying to place a sell order below the current bidprice as set in the variable LowPrice, i checked all the variables and they come through fine.
Hope you can help not sure if it should be selllimit
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,LowPrice,3,LowPrice-(StopLoss*Point),LowPrice-(TakeProfit*Point),"Rags to Riches",MagicNumber,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELLSTOP order opened : ",LowPrice);
}
else Print("Error opening pending SELL order : ",GetLastError());
return(0);
I am trying to demo the ea and get this error opening sell order - 131
The funtion is below:- i am trying to place a sell order below the current bidprice as set in the variable LowPrice, i checked all the variables and they come through fine.
Hope you can help not sure if it should be selllimit
ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,LowPrice,3,LowPrice-(StopLoss*Point),LowPrice-(TakeProfit*Point),"Rags to Riches",MagicNumber,0,Red);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("SELLSTOP order opened : ",LowPrice);
}
else Print("Error opening pending SELL order : ",GetLastError());
return(0);