Ho to insert in the stone a order SL?

 
Is there a code to insert an SL order into the stone after executing the sales or purchase order? I using the Trade.mqh in my expert code.
 
Márcio Andrade:
Is there a code to insert an SL order into the stone after executing the sales or purchase order? I using the Trade.mqh in my expert code.

What is Stone?

 
Keith Watford:

What is Stone?

In book of stock exchange, in my country is "in the stone".

 
Márcio Andrade:
Is there a code to insert an SL order into the stone after executing the sales or purchase order? I using the Trade.mqh in my expert code.

Is this what you seek?

https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradepositionmodify

Documentation on MQL5: Standard Library / Trade Classes / CTrade / PositionModify
Documentation on MQL5: Standard Library / Trade Classes / CTrade / PositionModify
  • www.mql5.com
Successful completion of the PositionModify(...) method does not always mean successful execution of the trade operation. It is necessary to check the result of trade request (trade server return code) using ResultRetcode(). If...
 

No, i need the stop loss order to be on the stock exchange in the book like Buy Limit and the Sell Limit stays. Does MQL have this possibility?

 

My expert estrategy full time order opened, stop loss is backup of problens for me.

 
Márcio Andrade:

My expert estrategy full time order opened, stop loss is backup of problens for me.

I think what you mean is the SL/TP Orders being sent directly to the Stock Exchange servers, instead of residing on the Broker/MT's servers, or, even worse, in the user machine, correct?

;)

 
Minions Labs:

I think what you mean is the SL/TP Orders being sent directly to the Stock Exchange servers, instead of residing on the Broker/MT's servers, or, even worse, in the user machine, correct?

;)

I necessity send SL/TP orders direct to Stock Exchange, because the orders, residing in my user machine and send to Stock Exchange after price or conditions of broker/MetaTrader setups is ok.


I send my orders Sell Limit/SL/TP to stock exchange combined

/united/together. Is possible in expert code MetaTrader?


#include <Trade\Trade.mqh>

m_trade.BuyLimit(lot,price,Symbol,sl,tp,0,0,"0");
m_trade.SellLimit(lot,price,Symbol,sl,tp,0,0,"0");


BuyLimit and SellLimit is ok, all send to Stock Exchange after runing code.

 
I send BuyStop and SellStop for replace the SL this not send to Stock Exchange equal SL order.
 
Please, one help for my code!
 
Márcio Andrade:
Please, one help for my code!

Hi Marcio,

I think that this architectural behavior depends not solely on MT, but also with the Broker's infrastructure for MT. I suggest you to post this question directly on the BR Forum, so you will have a more objective answer.

As an example, I work with a brazilian Broker that holds all SL/TP on MT servers on the Broker side, not in B3's servers (Brazilian Stock Market).

On the other way, using, e.g. the Brazilian-specific Tryd trading platform, I have the possibility to put my SL/TP orders directly on the B3's servers...

;)

Reason: