OrderSend not working?

 

        if(SARCurrent > Ask) {ticket =OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,  "SAR Sell",MagicNumber,0,Red);           send.text.3();}

 

why would this execute the    send.text.3();    subroutine, but not open an order?

The Journal shows nothing except the mail: text being sent. 

 
mrchuckw:

        if(SARCurrent > Ask) {ticket =OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,  "SAR Sell",MagicNumber,0,Red);           send.text.3();}

 

why would this execute the    send.text.3();    subroutine, but not open an order?

The Journal shows nothing except the mail: text being sent. 

Read the documentation for OrderSend() and call the function with the correct parameters  . . .  

 

you have

ParameterYour Value
symbolSymbol()
cmdOP_SELL
volumeLots
priceBid
slippage3
stoploss0
takeprofit"SAR Sell"
commentMagicNumber
magic0
expirationRed
arrow-color

 

Do you see the problem ? 

 


thanks... after the researching and testing on my own, it turned out to have a wrong parameter count.   

But the compiler didn't tell me that, and the Journal didn't tell me that...  

It was a real head scratcher. 

Reason: