Download MetaTrader 5

How to get closest Stoplevel

To add comments, please log in or register
chinaski
977
chinaski  

Hello,

Have a position for Symbol x and need to know the closes StopLevel that would be accepted by trade server.

How to do this ?

Thank you 

Pasi Hakamaki
7769
Pasi Hakamaki  
I am not on my computer now so I cannot give you detailed answer but look for SYMBOL_TRADE_STOPS_LEVEL from documentation might help you.

Br, Candles
Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
Candles:
I am not on my computer now so I cannot give you detailed answer but look for SYMBOL_TRADE_STOPS_LEVEL from documentation might help you.

Br, Candles
 . .  and bear in mind the Spread,  if your STOPS LEVEL is 0 you still can't set your SL closer than the Spread.
phi nuts
2181
phi nuts  
Candles:
I am not on my computer now so I cannot give you detailed answer but look for SYMBOL_TRADE_STOPS_LEVEL from documentation might help you.

Br, Candles
What Candles mean was SymbolInfoInteger's SYMBOL_TRADE_STOPS_LEVEL and SYMBOL_TRADE_FREEZE_LEVEL
chinaski
977
chinaski  

Thank you,

so

Bid - SYMBOL_TRADE_STOPS_LEVEL for long position

and

ASK + SYMBOL_TRADE_STOPS_LEVEL  for short position

Should do it. 

To add comments, please log in or register