Triplet – Trading Systems – 26 September 2023
Overview
As its name suggests, Triplet is a grid trade (repeat system) EA that can trade 1 to 3 pairs at the same time.
Risk diversification is possible by combining 3 pairs with low correlation (e.g. USDCHF / EURGBP / AUDNZD) or pairs with negative correlation (e.g. USDJPY / S&P500).
- Pairs || No restrictions. All pairs available.
- 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.
- Minimum required Deposit || You can adjust.
- Timeframe || Monthly timeframe is recommended.
- By using monthly timeframe, your MT5 can get more historical data
Sales Page
Performances
Real account performance
You can check the EA performance on mql5 signal
Backtest result on MT5
You can get the zip file of 7 years backtest resiult on the bottom
Logic and Parameters
here is paramerter’s summary.
After this, you can see detail parameter explain(Parameters are enclosed in [].
Parameter | Roll | Usage |
---|---|---|
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 |
noTradeCoreRange | 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) |
symbol2 | Logic | Determine which pair to trade additionaly |
symbol3 | Logic | Determine which pair to trade additionaly |
Determining what to trade
- 1 to 3 pairs can be traded at the same time
- The first pair follows the currency of the chart that runs the EA
The second is determined by [symbol2], the third by [symbol3] - In other words, if you do not enter anything in [symbol2] or [symbol3], the number of symbols traded will be reduced accordingly.
- The first pair follows the currency of the chart that runs the EA
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
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
- Determine trading method based on CenterLine
- For prices above CenterLine, only short trades
- For prices below CenterLine, only long trades
no trade range
[noTradeCoreRange] decides to prohibit trading.
No trades are made within the range of [noTradeCoreRange] above and below the CenterLine.
By prohibiting trading around the CenterLine, the unrealized loss will be less even if the rate moves up or down dynamically.
The range where trading is prohibited is as follows.
In other words, if [noTradeCoreRange] is greater than 0.5, no trades will be made.
no trade range: (CenterLine – Distance * [noTradeCoreRange]) ~ (CenterLine + Distance *[noTradeCoreRange])
TakeProfit and trade “interval” for each position
There is one position for each “interval”.
The calculation formula of “interval” is as follows.
interval = Distance / [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], but not if the interval is less than [minTP]pips or more than [maxTP]pips.
About “interval”, each currency pair will not interfere with each other. “interval” is managed for each currency pair.
Stop loss
By default, no stop loss is provided because the basic strategy of thie EA is not to set a stop loss.
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
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
- 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 [noTradeCoreRange] under 0.5.
- Set [risk] = 0
- It is recommend to disable safe functions
- 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.
Variable | Start | Step | Stop |
---|---|---|---|
pricePeriod | 1 | 1 | 96 |
noTradingCoreRange | 0 | 0.05 | 0.5 |
positionHalf | 1 | 1 | 50 |
minTP | 10 | 5 | 100 |
maxTP | 101 | 10 | 301 |
※If you feel that the machine power is not enough, we recommend using MQL5 Cloud Network.
Optimization result sample (2015/05~2022/07)
The best settings when optimizing on the author’s machine are as follows(EURGBP & AUDNZD).
Variable | Value |
---|---|
pricePeriod | 36 |
noTradingCoreRange | 0.16 |
positionHalf | 31 |
minTP | 95 |
maxTP | 271 |
symbol1 | USDCHF |
symbol2 | AUDNZD |
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)
Comments are closed.