SimpleCoreRanger MT5
- Whole period
- 2 years
- 1 year
- 6 months
- 3 months
- 1 month
Forward testing (Profit)
Monthly Statistics
- Jan
- Feb
- Mar
- Apr
- May
- Jun
- Jul
- Aug
- Sep
- Oct
- Nov
- Dec
Calendar for Months
About EA's Strategy
Translating...
summary
SimpleCoreRanger is a grid trading (repeating) EA that trades short and long at the mid-price range and short only or long only at the edge of the chart.
- Pairs || pairs No limit. All pairs are available
- Not only FX pairs such as "EURUSD" and "USDJPY", but also "S&P500 (CFDs)", "XAUUSD (futures)", "BTCUSD (virtual currency)", etc. are available.
- Minimum Deposit || can be adjusted
- For example, my live account started with 500,000 Yen (= 3,700 USD)
- time frame || Use monthly legs
- By using monthly legs, MT5 can obtain more historical data
Logic and Parameters
Parameter Summary
| Parameter | roll | Usage |
|---|---|---|
| debugMode | log output | If true, display debug log in the journal |
| magicNumber | magic number | Set a unique value that will not be covered by other EAs |
| stopEquity | safe function | If the effective margin is less than or equal to stopEquity, no new order will be placed. To disable, set to 0 |
| stopMarginLevel | safe function | If the margin maintenance is less than stopMarginLevel, no new order is placed. To disable, set to 0 |
| stopDrawDownPer | safe function | When the drawdown is greater than or equal to stopDrawDownPer, no new orders will be placed. To disable, set 100 |
| spreadLimit | safe function | New orders are not placed when the spread is above spreadLimit. To disable, set 9999999999... To disable, set 9999999999... |
| risk | safe function | Automatic lot calculation by setting the risk parameter Risk and lot cannot be set at the same time To disable, set to 0 |
| lot | safe function | Fixes the lot size when trading risk and lot cannot be set at the same time To disable, set to 0. |
| pricePeriod | Trade Strategy | Determines how many monthly legs to use in the calculation |
| coreRange | Trade Strategy | Decide how far is the core range. |
| positionHalf | Trade Strategy | Outside the core range, determine how many positions you want to hold |
| positionCore | Trade Strategy | Decide how many positions to hold within the core range |
| minTP | Trade Strategy | Determines the minimum TakeProfit (in pips) that can be taken on a position. |
| maxTP | Trade Strategy | Determines the maximum TakeProfit (in pips) that can be taken on a position. |
| sl | Trade Strategy | Determines StopLoss (in pips) per position To disable, set to 0 (no StopLoss) |
Determination of grid range
This EA will create a trading strategy based on the Highest and Lowest prices during the past [PricePeriod] months from the current candlestick.
The formulas for each item are as follows
Highest = highest price in past [PricePeriod] months Lowest = lowest price in past [PricePeriod] months Distance = Highest - Lowest CenterLine = Distance / 2 + LowestThese values are used to calculate the interval for making trades.
About Trade
- All trades are executed by market orders. No limit orders are placed.
- This allows us to control trades during Spread expansion.
- Grid trade, so no stop loss is set
- Trades are broadly divided into two main categories: those inside the core range and those outside the core range.
- Within the core range, both short and long trades take place.
- Above the core range, only short trades are made.
- Below the core range, only long trades are made.
- This allows us to control trades during Spread expansion.
- Within the core range, both short and long trades take place.
- Above the core range, only short trades are made.
- Below the core range, only long trades are made.
The upper and lower limits of core range are coreHighest and coreLowest, respectively.
CoreHighest = CenterLine + Distance * [coreRange] CoreLowest = CenterLine - Distance * [coreRange] core range: CoreLowest ~ CoreHighestTP and trade interval for each position

There is one position in the same direction for each interval.
The formula for calculating the interval is as follows
- If in core range
interval =istance * ( 2 * [coreRange] ) / [positionCore] However, if interval < [minTP]pips, then interval = [minTP] However, if interval > [maxTP]pips, interval = [maxTP] if interval > [maxTP] pips.- Outside core range
interval = Distance * ( 1- 2 *[coreRange] ) / [positionHalf] If, however, interval < [minTP]pips, then interval = [minTP] If, however, interval > [maxTP]pips, However, if interval > [maxTP] pips, then interval = [maxTP].In other words, if you already have a position within the upper or lower INTERVAL range from the current price, no trade will be made.
The take-profit value of a position (TakeProfit) is also the same value as interval.
Basically, the value is close to [positionHalf] + [positionCore] with respect to the maximum number of positions, unless the interval is less than [minTP]pips or more than [maxTP]pips.
stop-loss
By default, no stop loss is provided. This is because the basic strategy of this EA is to not take a stop loss.
The specific values of the stop loss are as follows
Stoploss (long trade) = Ask - [sl]pips Stoploss (short trade) = Bid - [sl]pips * When [sl] = 0, no stop loss is set (default setting)About the number of lots
Two methods are available: fixed lot method and variable lot method.
If the number of lots is less than the minimum lot size specified by the broker, no trade will be made.
fixed lot method
In the fixed lot method, the lot is determined by the following formula
lot = [lot].variable lot method
In the variable lot method, the lot is determined by the following formula.
lot = free margin * [risk] / margin required to buy 1 lot of trading pair- When drawdowns are large, the number of lots can be lowered, and when there is room, the number of lots can be raised, allowing for risk-free compound interest trading.
- It is easy to balance when trading multiple pairs.
- For example, when trading one lot, the margin requirement differs between EURUSD and USDJPY, so the fixed lot method will result in a bias toward one of the pairs.
- With the variable lot method, this problem does not occur because the lot is determined based on the surplus margin.
In the case of variable lot, the number of lots is calculated based on the surplus margin, so the higher the leverage, the more the surplus margin increases and the higher the risk becomes. Please be careful when changing leverage.
If you want to use a variable lot, set [lot] to 0.
safe function
- If the current spread is greater than or equal to [spreadLimit], the trade will be paused
- To disable, set [spreadLimit] = 99999999...
- Transactions will be paused if current valuation is less than [stopEquity
- To disable, set [stopEquity] = 0
- Suspend trading when margin maintenance falls below [stopMarginLevel].
- To disable, set [stopMarginLevel] = 0
- Transactions are paused when drawdown exceeds [stopDrawDownPer].
- To disable, set [stopDrawDownPer] = 100
- To disable, set [spreadLimit] = 99999999...
- To disable, set [stopEquity] = 0
- To disable, set [stopMarginLevel] = 0
- To disable, set [stopDrawDownPer] = 100
magicNumber
To identify the positions managed by this EA, set [magicNumber] to a value that does not cover any other EA.
This EA will only operate on positions tied to [magicNumber].
log

Any problems that occur on the EA will be displayed in the upper left corner of the chart.
When [debugMode] is turned on, you can check the log not only on the top left of the chart, but also on the Journal of MT5.
*When debugMode is turned on, too many logs accumulated may overwhelm the storage space of MT5 and the machine, causing malfunctions. Please pay attention to the amount of remaining storage when using this function.
About Optimization


Higher performance can be achieved by optimizing for the pair you wish to use.
- When managing multiple pairs, risk diversification can be expected by selecting pairs with low correlation.
- [lot] should be the minimum lot (0.1 or 0.01).
- [coreRange] < 0.5. If
- Set [risk] = 0
- It is recommended to turn off the SAFE function
- We recommend using "Complex Criterion Max" for optimization evaluation.
- For optimization, we recommend a testing period of at least three years.
- To avoid curve fitting, it is recommended that half of the testing period be devoted to forward testing.
Recommended optimization items are as follows
Please make adjustments based on your own preferences and machine specs.
| Variable | Start | Step | Stop. |
|---|---|---|---|
| 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 |
Sample optimization results (2015/05~2022/07)
The best settings for optimization on the author's machine are as follows
- AUDNZD
| Variable | Value |
|---|---|
| pricePeriod | 24 |
| coreRange | 0.2 |
| positionHalf | 23 |
| positionCore | 35 |
| minTP | 50 |
| maxTP | 260 |
- USDCHF
| Variable | Value |
|---|---|
| pricePeriod | 96 |
| coreRange | 0.1 |
| positionHalf | 46 |
| positionCore | 33 |
| minTP | 60 |
| maxTP | 250 |
- EURGBP
| Variable | Value |
|---|---|
| pricePeriod | 93 |
| coreRange | 0.3 |
| positionHalf | 31 |
| positionCore | 11 |
| minTP | 34 |
| maxTP | 140 |
Error messages encountered during optimization
If the following error occurs during optimization, optimization may not be working.

In this case, it is recommended to check the details of the error with "Visualize Test".

Enter the set of parameters that may have failed and start the "Visualize Test

Error details (alert messages) can be checked.

Price: $188.33 (taxed)
¥30,000(taxed)
●Payment
Sales from : 12/20/2023 22:45
Price: $188.33 (taxed)
¥30,000(taxed)
●Payment
Just like discretionary trading, there are those that decide trading and settlement timings by combining indicators, those that repeatedly buy or sell at certain price (pips) intervals, and trading methods that utilize market anomalies or temporal features. The variety is as rich as the methods in discretionary trading.
To categorize simply,
・Scalping (Type where trades are completed within a few minutes to a few hours),
・Day Trading (Type where trades are completed within several hours to about a day),
・Swing Trading (Type where trades are conducted over a relatively long period of about 1 day to 1 week)
・Grid/Martingale Trading (Holding multiple positions at equal or unequal intervals and settling all once a profit is made. Those that gradually increase the lot number are called Martingale.)
・Anomaly EA (Mid-price trading, early morning scalping)
However, a substantial advantage of automated trading is its ability to limit and predict risks beforehand.
[Risk]
Inherent to forex trading are the trading risks that undeniably exist in automated trading as well.
・Lot Size Risk
Increasing the lot size forcibly due to a high winning rate can, in rare instances, depending on the EA, lead to substantial Pips loss when a loss occurs. It is crucial to verify the SL Pips and the number of positions held before operating with an appropriate lot.
・Rapid Market Fluctuation Risk
There are instances where market prices fluctuate rapidly due to index announcements or unforeseen news. System trading does not account for such unpredictable market movements, rendering it incapable of making decisions on whether to settle in advance or abstain from trading. As a countermeasure, utilizing tools that halt the EA based on indicator announcements or the VIX (fear index) is also possible.
[Benefits]
・Operates 24 hours a day
If there is an opportunity, system trading will execute trades on your behalf consistently. It proves to be an extremely convenient tool for those unable to allocate time to trading.
・Trades dispassionately without being swayed by emotions
There is an absence of self-serving rule modifications, a common human tendency, such as increasing the lot size after consecutive losses in discretionary trading or, conversely, hastily securing profits with minimal gains.
・Accessible for beginners
To engage in Forex trading, there is no prerequisite to study; anyone using system trading will achieve the same results.
[Disadvantages]
・Cannot increase trading frequency at will
Since system trading operates based on pre-programmed conditions, depending on the type of EA, it might only execute trades a few times a month.
・Suitability may vary with market conditions
Depending on the trading type of the EA, there are periods more suited to trend trading and periods more suited to contrarian trading, making consistent results across all periods unlikely. While the previous year might have yielded good results, this year's performance might not be as promising, necessitating some level of discretion in determining whether it is an opportune time to operate.
・MT4 (MetaTrader 4. An account needs to be opened with a Forex company that offers MT4.)
・EA (A program for automated trading)
・The operating deposit required to run the EA
・A PC that can run 24 hours or a VPS (Virtual Private Server), where a virtual PC is hosted on a cloud server to run MT4.
Additionally, there are both demo and real accounts available. You can experience trading with virtual money by applying for a demo account. After opening a real account, you select the connection server assigned by the Forex broker, enter the password, and log in to the account.
When you deposit money into your account using the method specified by the forex broker, the funds will be reflected in your MT4 account, and you can trade.
Firstly, download the purchased EA file from your My Page on GogoJungle. You will download a zip (compressed) file, so right-click to extract it and retrieve the file named ‘◯◯◯ (EA name)_A19GAw09 (any 8 alphanumeric characters).ex4’ from inside.
Next, launch MT4 and navigate to ‘File’ → ‘Open Data Folder’ → ‘MQL4’ → ‘Experts’ folder, and place the ex4 file inside. Once done, close MT4 and restart it. Then, go to the upper menu ‘Tools’ → ‘Options’, and under ‘Expert Advisors’, ensure ‘Allow automated trading’ and ‘Allow DLL imports’ are checked, then press OK to close.
The necessary currency pair and time frame for the correct operation of the EA are specified on the EA sales page. Refer to this information and open the chart of the correct currency pair time frame (e.g., USDJPY5M for a USD/Yen 5-minute chart).
Within the menu navigator, under ‘Expert Advisors’, you will find the EA file name you placed earlier. Click to select it, then drag & drop it directly onto the chart to load the EA. Alternatively, you can double-click the EA name to load it onto the selected chart.
If ‘Authentication Success’ appears in the upper left of the chart, the authentication has been successful. To operate the EA, you need to keep your PC running 24 hours. Therefore, either disable the automatic sleep function or host MT4 on a VPS and operate the EA.
If you want to use it with an account other than the authenticated one, you need to reset the registered account.
To reset the account, close the MT4 where the Web authentication is registered, then go to My Page on GogoJungle > Use > Digital Contents > the relevant EA > press the ‘Reset’ button for the registration number, and the registered account will be released.
When the account is in a reset state, using the EA with another MT4 account will register a new account.
Also, you can reset the account an unlimited number of times.
→ Items to Check When EA is Not Operating
1 lot = 100,000 currency units
0.1 lot = 10,000 currency units
0.01 lot = 1,000 currency units
For USD/JPY, 1 lot would mean holding 100,000 dollars.
The margin required to hold lots is determined by the leverage set by the Forex broker.
If the leverage is 25 times, the margin required to hold 10,000 currency units of USD/JPY would be:
10000*109 (※ at a rate of 109 yen per dollar) ÷ 25 = 43,600 yen.
・Risk-Return Ratio: Total Profit and Loss during the period ÷ Maximum Drawdown
・Maximum Drawdown: The largest unrealized loss during the operation period
・Maximum Position Number: This is the maximum number of positions that the EA can theoretically hold at the same time
・TP (Take Profit): The set profit-taking Pips (or specified amount, etc.) in the EA's settings
・SL (Stop Loss): The set maximum loss pips (or specified amount, etc.) in the EA's settings
・Trailing Stop: Instead of settling at a specified Pips, once a certain profit is made, the settlement SL is raised at a certain interval (towards the profit), maximizing the profit. It is a method of settlement.
・Risk-Reward Ratio (Payoff Ratio): Average Profit ÷ Average Loss
・Hedging: Holding both buy and sell positions simultaneously (Some FX companies also have types where hedging is not allowed)
・MT4 Beginner's Guide
・Understanding System Trading Performance (Forward and Backtesting)
・Choosing Your First EA! Calculating Recommended Margin for EAs
・Comparing MT4 Accounts Based on Spread, Swap, and Execution Speed
・What is Web Authentication?
・Checklist for When Your EA Isn't Working
