Download MetaTrader 5

How to get closest Stoplevel

To add comments, please log in or register
Start making profit using the Market. Publish your product!
chinaski
890
chinaski 2013.03.14 14:10 

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
4678
Pasi Hakamaki 2013.03.14 14:28  
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
17998
Simon Gniadkowski 2013.03.14 14:30  
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
2184
phi nuts 2013.03.14 14:43  
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
890
chinaski 2013.03.14 14:47  

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