Example - Scale Price Gap Down by Rate

Example - Scale Price Gap Down by Rate

  • Goal: I want to start with 10 pips gap size and I want the EA to start scaling down the price gap size when the price moves against the first trade by 2 or more price levels. In that case I want to make the gap sizes reduced to 80% of the gap (i.e. smaller by 20%), compounding for each subsequent level, however I do not want the gap size to become less than 5 pips.
  • How-to: Here is an example EA configuration how to achieve the above:
    1. Price Gap = 10
    2. Gap Scaling Start Level = 2
    3. Gap Scaling Rate = 80
    4. Minimum Gap Size = 5

    Below shows the price gaps in pips to be used for the trade entries:

    Price LevelEffective Gaps after BUY Initial TradeEffective Gaps after SELL Initial Trade
    Up 6-5
    Up 5-5
    Up 4-5.1
    Up 3-6.4
    Up 2-8
    Up 1Exit at Closure Target10
    Initial Entry1010
    Down 110Exit at Closure Target
    Down 28-
    Down 36.4-
    Down 45.1-
    Down 55-
    Down 65-