Stop Level for Gold

 

Hi all, how can I set the minimum entry level if the stop level in the specs is zero? 


I would like to write something like this to avoid error 130:

Entry_Long = Max(Entry_Long,Ask+MarketInfo(Symbol(),MODE_STOPLEVEL))

Thank you

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...
 

Why did you start a new thread when you already have a related thread open? ... Corn min stop

If it is zero then there is no stops level for that symbol.

Also, the Stops Level is always in points (not price range), as already explained in your other thread.

 

If the stop level is zero, how can I set the minimum stop loss level?

If I try to open a trade manually stop price must respect a minimum distance, but I don't know how to determine it if the indicated stop level is zero.

 

Alberto Tortella #: If the stop level is zero, how can I set the minimum stop loss level?

If I try to open a trade manually stop price must respect a minimum distance, but I don't know how to determine it if the indicated stop level is zero.

If it is zero, then there is no minimum!!!

Read the following ... Requirements and Limitations in Making Trades

Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
  • book.mql4.com
Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
 
Fernando Carreiro #:

Also, the Stops Level is always in points (not price range), as already explained in your other thread.

How can I transform the stop level from points to price?

 
Alberto Tortella #: How can I transform the stop level from points to price?

Add the appropriate price, as already mentioned in your other thread.

 
Alberto Tortella #:How can I transform the stop level from points to price?

Using your example code (in old MQL4) ...

Entry_Long = Max(Entry_Long,Ask+MarketInfo(Symbol(),MODE_STOPLEVEL)*Point)

However, consider using the more modern MQL4+ code in your programs instead, as it is very similar to MQL5.

The checks a trading robot must pass before publication in the Market
The checks a trading robot must pass before publication in the Market
  • www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
 
Thank you very much!
Reason: