About SimpleCoreRanger

投資

Sales Page

In the Standard edition, all functions are available forever for free.

Now selling only Pro version

In the Pro version, in addition to the functions of the Standard version, the following additional functions are available.

  • Trading restrictions when spread widens
  • Safe function (stop trading when margin or margin level drops)
  • Compound interest trading function (automatic calculation of lot based on free margin)
  • Stop loss can be set by pips
Buy the 'SimpleCoreRanger pro' Trading Robot (Expert Advisor) for MetaTrader 5 in MetaTrader Market
Overview 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

Performances

Real account performance

You can check the EA performance on real account on myfxbook.

Forex Trading Profile of bbjjki4 | Myfxbook
View the profile of Forex Trader bbjjki4 - forex trading systems, strategies and forum posts.

Backtest result on MT5

You can check about 7 years backtest result here

Overview

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.

  • Timeframe || Monthly timeframe is recommended.
    • By using monthly timeframe, your MT5 can get more historical data

Logic and Parameters

here is paramerter’s summary.

After this, you can see detail parameter explain(Parameters are enclosed in [].)

ParameterRollUsage 
 debugMode Output log When true, log will appear on Journal.
 magicNumber Distinguish trades Set a value that does not overlap with other EAs
 stopEquity Safe function New position is not open if current equity is lower than stopEquity.
 To disable, set 0.
 stopMarginLevel Safe function New position is not open if current stop margin levelis lower than  stopMarginLevel
 To disable, set 0.
 stopDrawDownPer Safe function New position is not open if current draw down is lower than  stopDrawDownPer
 To disable, set 100.
 spreadLimit Safe function New position is not open if current supread is over spreadLimit
  To disable, set 99999999…..
 risk Lot calcuration Trade lot is automatically calcurated by risk.
 risk and lot parameters can’t be set at he same time.
 To disable, set 0.
 lot Lot calcuration Trade lot is automatically calcurated by risk.
 risk and lot parameters can’t be set at he same time.
 To disable, set 0.
 pricePeriod Logic Determine how many monthly bars to use for calculation
 coreRange Logic Determine What price range is the core range.
 positionHalf Logic Determine how many positions EA have outside the core range.
 positionCore Logic Determine how many positions EA have in the core range.
 minTP Logic Minimum tp(by pips) that a position can take
 maxTP Logic Maximum tp(by pips) that a position can take
 sl Logic stop loss(by pips)
 To disable set 0 (No stop loss)

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
CenterLine = Distance / 2 + Lowest
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
  • 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: from CoreLowest to 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.

  • in the core range
interval = Distance * ( 2 * [coreRange] ) / [positionCore]

But if interval < [minTP]pips then interval = [minTP] 
But if interval > [maxTP]pips then interval = [maxTP]
  • outside the core range
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.

Stop loss

※[sl] parameter is available only in pro edition

By default, no stop loss is provided because the basic strategy of thie EA is not to set a stop loss.

In pro version, you can set stoploss by pips.

The value of stopplos will be,

Stoploss(Long trade) = Ask - [sl]pips
Stoploss(Short trade) = Bid - [sl]pips

※ No stop loss is provided if you set [sl] = 0(Default setting)

About the number of lots

※[risk] parameter is available only 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.

lot = [lot]

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][stopDrawDownPer] parameters are available onlyin pro edition

  • Pause trading if the current spread is greater than or equal to [spreadLimit]
    • To disable, set [spreadLimit] = 99999999…
  • Pause trading when current equity is less than [stopEquity]
    • To disable, set [stopEquity] = 0
  • Pause trading when the margin level falls below [stopMarginLevel]
    • To disable, set [stopMarginLevel] = 0
  • Pause trading when drawdown exceeds [stopDrawDownPer]
    • To disable, set [stopDrawDownPer] = 100

magicNumber

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].

Log

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

Higher performance can be achieved by optimizing the pair you want to use.

  • When managing multiple pairs, risk diversification can be expected by choosing pairs with less correlation.
  • Specify the minimum lot (0.1 or 0.01) for [lot].
  • Set [coreRange] < 0.5.
  • In pro version,
  • It is recommended to use “Complex Criterion Max” for optimization evaluation
  • For optimization, I recommend a testing period of at least 3 years.
  • To avoid curve fitting, it is recommended to dedicate half of the testing period to forward testing.

The recommended optimization items are as follows.

Please adjust while consulting with your preferences and machine specs.

VariableStartStepStop
pricePeriod1196
coreRange00.050.5
positionHalf1150
positionCore1150
minTP105100
maxTP10110301

※If you feel that the machine power is not enough, we recommend using MQL5 Cloud Network.

Speed Up Calculations with the MQL5 Cloud Network
How many cores do you have on your home computer? How many computers can you use to optimize a trading strategy? We show here how to use the MQL5 Cloud Network ...

The error messages while optimization

If you get the error messages like below, optimization may not work.

It’s better to cofirm the detail of errors by “Visualize test”

Run Visualize test with suspicious parameter set.

And you can check the detail of errors(Alert message)

Optimization result sample (2015/05~2022/07)

The best settings when optimizing on the author’s machine are as follows.

  • AUDNZD
VariableValue
pricePeriod24
coreRange0.2
positionHalf23
positionCore35
minTP50
maxTP260
  • USDCHF
VariableValue
pricePeriod5
coreRange0.05
positionHalf34
positionCore31
minTP55
maxTP150
  • EURGBP
VariableValue
pricePeriod93
coreRange0.3
positionHalf31
positionCore11
minTP34
maxTP140

タイトルとURLをコピーしました