How can the EA perform sound in the case of pending order?

 

How can the EA perform sound in the case of a pending order?

For instance, colourful sound for the close of take profit and sorrowful sound for the close of stoploss. And notice sound for the success of sending an pending order.

can any one with kindness help me?

 
lserjt wrote >>

How can the EA perform sound in the case of a pending order?

For instance, colourful sound for the close of take profit and sorrowful sound for the close of stoploss. And notice sound for the success of sending an pending order.

can any one with kindness help me?

You may have a check on PlaySound() function. Thanks

 

I am not clear yet . All I want is to hear the different sounds of the close of take profit and the close of stoploss of a pending oder.

The close of a pending order is determined by the server. And the time to close is uncertain.

How can I put the code into the EA?

can anyone give me an example?

Thanks.

 
add PlaySound() to your code, and add ColorfulSound.wav and SorrowfulSound.wav to /sounds folder
 

Maybe I did not explained myself clearly enough.
if the order I sent is
OrderSend(Symbol(),OP_BUY,Lots,Ask,3,bid-StopLoss*Point,Ask+TakeProfit*Point,"macd sample",16384,0,Green);
and it is accepted by the main server. And I do not use OrderClose or OrderModify to change such
order any more. Just waiting for the result from the Main server of the trader. when
the Price reach to the Ask+TakeProfit*Point, the main server will close the order due to take
prfit. I want a glad sound when the order is closed by the main server of the trader.
And so for Stoploss.

Can any one with kindness help me?

Reason: