EA Verification Issue*

 

Hello All,

I have an EA for market. It works fine in my back testing AND in my Live account.

But for some reason I can NOT get it to verify in the MQL5 testing.

I am using pending orders and only trading once a day.

I have attached the errors I'm getting. So it seems to work on GBPUSD but has issues with the other pairs.

It is not coded to a specific pair or timeframe....

Any Ideas...??

Regards*

Errors

 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 

Please search before you post. Error 145 has been asked, discussed, and answered many times ... https://www.mql5.com/en/search#!keyword=error%20145

    145

    ERR_TRADE_MODIFY_DENIED

    Modification denied because order is too close to market

    You have to check and adjust for the Stops and Freeze Levels — Requirements and Limitations in Making Trades

    Also read the following: The checks a trading robot must pass before publication in the Market

     
    Fernando Carreiro #:

    Please search before you post. Error 145 has been asked, discussed, and answered many times ... https://www.mql5.com/en/search#!keyword=error%20145

      145

      ERR_TRADE_MODIFY_DENIED

      Modification denied because order is too close to market

      You have to check and adjust for the Stops and Freeze Levels — Requirements and Limitations in Making Trades

      Also read the following: The checks a trading robot must pass before publication in the Market

      Thanks....I think....

      I did search....


      The orders are set to 200 pips away from the current market price already...

      If I move the orders further from the market price I just get the following errors..>>

      Any other ideas...? I'll have a look through that list....
      Tests

       
      Kalgan Morpheus Rivers #: The orders are set to 200 pips away from the current market price already... If I move the orders further from the market price I just get the following errors..>>


      Any other ideas...? I'll have a look through that list....

      Don't just arbitrarily change the price. Do a proper verification of the Stops and Freeze Levels. And make sure to use the proper reference market price Ask or Bid depending on the situation.

      Read and follow up on the links provided.

       
      Kalgan Morpheus Rivers #:

      Thanks....I think....

      I did search....


      The orders are set to 200 pips away from the current market price already...

      If I move the orders further from the market price I just get the following errors..>>

      Any other ideas...? I'll have a look through that list....

      Seems the problem is in the distance from Market Price for the Pending Orders.

      'Pips' is different on different instruments.


      For example: 200 pips on EURUSD is actually 2000 pips on GoldUSD.....etc....


      Thanks for replying*
       
      Kalgan Morpheus Rivers #: Seems the problem is in the distance from Market Price for the Pending Orders. 'Pips' is different on different instruments. For example: 200 pips on EURUSD is actually 2000 pips on GoldUSD.....etc....


      Thanks for replying*

      Don't use pips! That is only valid for Forex mainly and the contract specifications for all symbols, including Forex, don't even reference the "pip" anyway.

      Use points and tick size instead and always reference the contract specifications for the symbol and adjust accordingly.

       

      the term pip only applies to currencies.
                Ticks, PIPs or points in the GUI. Make up your mind. - MQL4 programming forum #1 (2014)
                Percentage in point - Wikipedia

      Unless you manually adjust your SL/TP for each separate symbol, using Point means code breaks on 4 digit brokers, exotics (e.g. USDZAR where spread is over 500 points), and metals. Compute what a logical PIP is and use it, not points.
                How to manage JPY pairs with parameters? - MQL4 programming forum (2017)
                Slippage defined in index points - Expert Advisors and Automated Trading - MQL5 programming forum (2018)

       
      Thankyou for your replies....I'm always learning :-)

      Anyway, I managed to get it through.

      Muchas Gracious
      Regards*
      Reason: