1 position with multiple SL

 

Hi everyone, I hope you're all well. 


how to have several stop losses for a single position pls ?

For example: I open one position of 0.10 lot and I would like to have a different stop loss for each 0.01 lot,  Do I have to open 10 positions of 0.01 lot?

it's not possible with 
PositionModify



Thank you in advance for your insights

Best Reguards,
ZeroCafeine 😉

Basic Principles - Trading Operations - MetaTrader 5 Help
  • www.metatrader5.com
Before you proceed to study the trade functions of the platform, you must have a clear understanding of the basic terms: order, deal and position...
 
I would suggest closing the trade partially. When price going opposite direction at certain distance you will close 0.01 lot. It is simpler to manage the trade since you only dealing with 1 trade rather than 10 trade.
 
I totally agree with you.

So if I want to have several stop losses for a single position registered in hard copy on the broker's server, I'm obliged to open several small positions, and no other solution?

for the CTrade class you advice me the  PositionClosePartial function ?  Or am I missing something

Best Reguards,
ZeroCafeine.
Documentation sur MQL5: Bibliothèque Standard / Classes pour le Trading / CTrade / PositionClosePartial
Documentation sur MQL5: Bibliothèque Standard / Classes pour le Trading / CTrade / PositionClosePartial
  • www.mql5.com
PositionClosePartial(const string,const double,ulong) - CTrade - Classes pour le Trading - Bibliothèque Standard - Référence MQL5 - Référence sur le langage de trading algorithmique/automatisé pour MetaTrader 5
 
On the other hand, if I reduce a position from 0.10 to 0.07, is it possible to increase the size of that same position for exemmple to 0.12 ? Or should I open a new position of 0.05 ?
 
ZeroCafeine #:
On the other hand, if I reduce a position from 0.10 to 0.07, is it possible to increase the size of that same position for exemmple to 0.12 ? Or should I open a new position of 0.05 ?

If your account allows hedging: you will have a separate 0.05

if the account does not allow hedge: the 0.05 is added to the running 0.07 and make a 0.12 open position.

 

tks you Yashar Seyyedin


To check if my account ? 

printf("ACCOUNT_HEDGE_ALLOWED   = %G",AccountInfoInteger(ACCOUNT_HEDGE_ALLOWED));

2023.12.14 14:56:05.530 AccountInfo ([SP500],M1) ACCOUNT_HEDGE_ALLOWED   = 1
this mean Allowed right ? 


When you say separated, isn't it possible to keep the same ticket from the 0.07 position and add 0.05 to it to have a final position of 0.12 with the same ticket?

I think I understand what Hedging means, but I'm having a bit of trouble understanding the logic right now, so I'm going to try a few tests of my own,


Thanks again for your reply. If you have a link or an article, that would be great.

Best Reguards,
ZeroCafeine 😉

Yashar Seyyedin
Yashar Seyyedin
  • 2023.11.21
  • www.mql5.com
Trader's profile
 

When you say separated, isn't it possible to keep the same ticket from the 0.07 position and add 0.05 to it to have a final position of 0.12 with the same ticket?

Not possible 
 

Thanks again for your reply. If you have a link or an article, that would be great.

Not a link or article but you can refer to your broker guide and see how they handle hedge.
 
Thank you very much 😉