Metatrader at AMPFUTURES - SP500 / Slippage on Limited Orders

Discussion in 'Automated Trading' started by Brazilzil, Nov 30, 2022.

  1. Brazilzil

    Brazilzil

    Hi Guys

    I start to test my Metatrader Expert Advisor at AMPFUTURES on Mini SP500.

    I have a few issues if anyone has experience about it and can comment.

    >> My EA open pending orders (SELL and BUY) to operate ranges of 16,20, 24 ticks. My orders have been executed with 1 tick (0.25) of slippage. Why LIMITED orders can be executed with slippage against me? These orders are theoretically sent to the exchange and executed at the specified price or better, never worse.

    Thank you in advance any help ;)
     
    Last edited: Nov 30, 2022
  2. MT5 cannot execute limit orders. Once limit price is touched, the order becomes market. That is Metatrader behavior.
     
  3. beyond clueless.

    MT5 is perfectly capable of executing limit orders, but they must be specified as such. native MT5 buy/sell functions behave the way you've described. This is true for stop orders as well - they must be specified as such by any EA or script, else you risk slippage.

    @hilmy83 still uses MT5 in his day to day trading and can also back me here. I migrated to Quantower after years of issues with MT5.
     
    Mr Subliminal and hilmy83 like this.
  4. jbt

    jbt

    You MUST explicitly make your order LIMIT NOT TP on MT5/AMP in order for it to sit on the ladder
     
    Overnight and lucysparabola like this.
  5. Brazilzil

    Brazilzil

    The ENTRY ORDER (sell or buy) not CLOSE (take profit / stop loss) has slippage. :(
    Take profit and Stoploss are market orders ok. But I think that entry orders should be LIMIT.
     
  6. Brazilzil

    Brazilzil

    Lucysparabola
    How to specifie as such LIMIT ORDERS?

    I think that entrey orders (buy or sell) no close orders (take profit / stop loss) are LIMIT ORDERS.
     
  7. I'm sure it's somewhere in the MQL5 documentation. I'm not a coder, I outsourced everything.
     
    Brazilzil likes this.
  8. Buy limit order :

    m_trade.OrderOpen(Symbol(), ORDER_TYPE_BUY_LIMIT, no_contracts, 0, price, 0 , 0)

    where m_trade is an object of class CTrade.
     
    Brazilzil likes this.
  9. Metatrader is designed to lose you money, no joke. The scam shops have their reasons to chose MT5&4 over any other plattform. It has many issues to your disadventage, for example price explosions leading to serious lags, no native partial profits and so on
     
    Brazilzil likes this.
  10. I don't see how your comment is relevant to AMP Futures.
     
    #10     Nov 30, 2022