SimpleCoreRanger – My Buying and selling – 31 January 2023

Gross sales Web page

Within the Customary version, all features can be found without end without cost.

Within the Professional version, along with the features of the Customary version, the next extra features can be found.

  • Buying and selling restrictions when unfold widens
  • Protected operate (cease buying and selling when margin or margin stage drops)
  • Compound curiosity buying and selling operate (computerized calculation of lot based mostly on free margin)

Efficiency on reside accounts

Additionally it is accessible as a duplicate buying and selling service.


  • SimpleCoreRanger is a grid trade (repeat type) EA that trades short and long in the middle price range, and only short or only long at the edge of the chart.
  • There are no restrictions on pairs, and any pair can be used.
    • It can be used not only for FX pairs such as “EURUSD” and “USDJPY”, but also for “S&P500 (CFD)”, “XAUUSD (futures)”, “BTCUSD (cryptocurrency)”, etc.
  • There are no restrictions on leverage and forex brokers
  • As for the time axis, we use the monthly chart internally. There is no need to adjust the time axis of the chart that runs the EA on the MT5 side

Logic and Parameters

Parameters are enclosed in [].

Determining the grid range

In this EA, a trading strategy is made based on the highest price (Highest) and lowest price (Lowest) of the past [PricePeriod] months from the current candlestick.

The calculation formula for each item is as follows.

Highest = highest price in the last [PricePeriod] months

Lowest = lowest price in the last [PricePeriod] months

Distance = Highest – Lowest CenterLine = Distance / 2 + Lowest

These values ​​are used to calculate the “interval” for making trades.

About trading

  • All trades are made with market orders. No limit orders
    • As a result, it is now possible to suppress trades when Spread is expanded
  • Since it is a grid trade, EA do not set a stop loss.
  • Trading methods are roughly divided into inside and outside the core range
    • Within the core range, both short and long trades are made
    • Only short trades above the core range
    • Only long trades under the core range

The upper limit of the core range is coreHighest, and the lower limit is coreLowest.

CoreHighest = CenterLine + Distance * [coreRange]

CoreLowest = CenterLine – Distance * [coreRange]

core range: CoreLowest ~ CoreHighest

TakeProfit and trade “interval” for each position

There is one positionin in the same direction for each “interval”.

The calculation formula of “interval” is as follows.

interval = Distance * ( 2 * [coreRange] ) / [positionCore]

But if interval < [minTP]pips then interval = [minTP]

But if interval > [maxTP]pips then interval = [maxTP]

interval = Distance * ( 1- 2 *[coreRange] ) / [positionHalf]

But if interval < [minTP]pips then interval = [minTP]

But if interval > [maxTP]pips then interval = [maxTP]

In other words, if you already have a position within the upper or lower interval from the current price, the trade will not take place.

Also, the take profit value of the position (TakeProfit) is the same value as the interval.

Basically, the maximum number of positions will be close to [positionHalf]+[positionCore], but not if the interval is less than [minTP]pips or more than [maxTP]pips.

About the number of lots

※[risk] parameter is only available in pro edition

Two methods are available: fixed lot method and variable lot method.

If the number of lots is less than the minimum lot specified by the broker, the trade will not take place.

Fixed lot method

In the fixed lot method, lot is determined by the following formula.

Variable lot method

In the variable lot method, lot is determined by the following formula.

lot = free margin * [risk] / margin required to buy 1 lot of trading pair

  • When the drawdown becomes large, it is possible to reduce the lot number and increase the lot number when there is room to do compound interest trading with reduced risk.
  • Easy to balance when trading multiple pairs.
    • For example, when trading 1 lot, the required margin is different between EURUSD and USDJPY, so with the fixed lot method, the bet will be biased towards one of the pairs.
    • In the floating lot method, this problem does not occur because the lot is determined based on the excess margin.

※When using variable lots, the number of lots is calculated based on free margin, so the higher the leverage, the more free margin and the higher the risk than expected. Be careful when changing leverage.

※When using variable lots, set [lot] to 0.

safe function

※[spreadLimit][stopEquity][stopMarginLevel] parameters are only available in pro edition

  • Do not trade if the current spread is greater than or equal to [spreadLimit]
  • Do not trade if the current valuation is less than or equal to [stopEquity]
  • If the current margin maintenance rate is less than [stopMarginLevel], no trades will be made.


To identify the position managed by this EA, set [magicNumber] so that it does not overlap with other EAs.

This EA operates only on the positions associated with [magicNumber].


Troubles that occur on the EA are displayed on the upper left of the chart.

If you turn on [debugMode], you can check the log not only on the upper left of the chart but also on MT5 Journal

※When debugMode is ON, if too many logs accumulate, MT5 and machine storage may be squeezed and malfunction may occur. Please pay attention to the remaining storage capacity when using.

About optimization


Larger efficiency could be achieved by optimizing the pair you wish to use.

  • When managing a number of pairs, danger diversification could be anticipated by selecting pairs with much less correlation.
  • Specify the minimal lot (0.1 or 0.01) for [lot].
  • It’s endorsed to make use of “Complicated Criterion Max” for optimization analysis.
  • For optimization, I like to recommend a testing interval of a minimum of 3 years.
  • To keep away from curve becoming, it is strongly recommended to dedicate half of the testing interval to ahead testing.

The really helpful optimization gadgets are as follows.

Please modify whereas consulting together with your preferences and machine specs.

Variable Begin Step Cease
pricePeriod 1 1 96
coreRange 0 0.05 0.5
positionHalf 1 1 50
positionCore 1 1 50
minTP 10 5 100
maxTP 101 10 301

※In case you really feel that the machine energy isn’t sufficient, we advocate utilizing MQL5 Cloud Community.

Optimization end result pattern (2015/05~2022/07)

The very best settings when optimizing on the writer’s machine are as follows(AUDNZD)

Variable Worth
pricePeriod 24
coreRange 0.2
positionHalf 23
positionCore 35
minTP 50
maxTP 260