Results 1 to 3 of 3
 0 Attachment(s)    

Thread: Should Slippage=Spread in an EA?

  1. #1

    Default Should Slippage=Spread in an EA?

    in an EA that has a 'slippage' box, would it be best to make it equal to your average spread on the currency pair when backtesting, because I assume when backtesting, it's not taking spread into account at all. Am I totally off? Any help appreciated.

    SP.
    "If you took everything I've accomplished in my life, and condensed it down to one day, it'd be decent." -- George Costanza

  2. #2
    Junior Member
    Join Date
    Jan 2009
    Posts
    28

    Default

    During backtest, it does takes into account the current spread rate. It takes the spread rate during the moment when you click on the "Start" button.

    It is generally not recommended to change the value of your slippage to your spread rate. Slippage should be left at maybe 5-6 pips max in my opinion if you're using a scalper-type EA. For those very sensitive scalper type EAs, probably 2-3 pips of slippage would be their maximum tolerance lvl.

    To display the spread rate during backtest use the following code in your start() function:

    if(Digits == 4) //if the broker is a 4 digit broker
    {
    Comment("\nCurrent Spread = ",MarketInfo(Symbol(),MODE_SPREAD));
    }
    else
    if(Digits == 5) // if the broker is a 5 digit broker
    {
    Comment("\nCurrent Spread = ",(MarketInfo(Symbol(),MODE_SPREAD))/10);
    }

  3. #3

    Default

    thanks very much for your info there Huios. Appreciated.
    "If you took everything I've accomplished in my life, and condensed it down to one day, it'd be decent." -- George Costanza

Similar Threads

  1. EUR/USD Spread 0.1 pip
    By YADIX ECN/STP Broker in forum Brokers
    Replies: 0
    Last Post: 11-22-2013, 09:04
  2. Slippage and lot multyplier
    By himnoor in forum MQL programming
    Replies: 2
    Last Post: 01-11-2011, 17:11
  3. Vol spread
    By lucky30 in forum Ideas for expert advisors
    Replies: 24
    Last Post: 02-14-2010, 22:20

Tags for this Thread

average, backtest, backtesting, broker, change, eas, scalper, slippage, spread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •