Invalid Expiration - How to solve it ? Please, guide me.

 

Hello.

Got:

2023.08.10 14:03:02.176    Trades    '3008608544': failed sell stop 10 WINQ23 at 118810 sl: 118815 tp: 118805 [Invalid expiration]


I did many searches, tried many things and nothing result in success for the sell stop pending order i am trying to place.

I attached the image of my broker symbol parameters.

Expiration : Today


What are the vars i have to check/set? Do u have a working code?

 

You probably have placed the values on the wrong place when calling OdrerSend or an equivalent function.

Place your cursor on that function and press F1 then read and check that.

 
Carl Schreiber #:

You probably have placed the values on the wrong place when calling OdrerSend or an equivalent function.

Place your cursor on that function and press F1 then read and check that.

Thanks for your reply.


My code for ordersend is OK cause it works for other types of orders like market orders and buylimit. Here goes relevant code:

   MqlTradeRequest request={};  
   MqlTradeResult  result={};
   
   ZeroMemory(request);
   ZeroMemory(result);
 
   request.action = TRADE_ACTION_PENDING;
   . . .
   help here
   . . . 

   if(!OrderSend(request, result))
   {
      Print("OrderSend error ", result.retcode);
   }


I am trading a demo account with much more virtual money to place an order.