
SUPERTREND OSCILATOR TRADING STRATEGIES EA MT4/MT5 BACKTESTS & NEW OPTIMIZED SET FILES

Supertrend Settings Documentation
This Expert Advisor (EA) includes a Supertrend-based strategy, a popular technical analysis tool used to identify trends and potential entry and exit points. The Supertrend indicator combines volatility and trend-following elements, making it a versatile tool for various market conditions.
The documentation is divided into indicator-related settings and additional features. The indicator-related settings focus on configuring the Supertrend parameters. For additional features such as grid recovery, hedging, and martingale strategies, refer to the .
MT4 Version is available here Supertrend Strategy EA MT4
MT5 Version is available here Supertrend Strategy EA MT5
1. Supertrend Settings
Supertrend Input Parameters
- SUPERTREND1__TEXT_1 - Divider text for visual clarity in the input section. (Not used in calculations)
- SUPERTREND1_TEXT - Label for Supertrend 1 settings. (Not used in calculations)
- SUPERTREND1__TEXT_2 - Divider text for visual clarity in the input section. (Not used in calculations)
- InpTimeFrame - Specifies the timeframe for the Supertrend indicator.
- Options: Any valid timeframe (e.g., M1, H1, D1).
- Default: PERIOD_CURRENT (uses the current chart timeframe).
- period - Defines the period used for calculating the average true range (ATR).
- A higher value smooths the trend but may delay signals.
- Default: 10 .
- multiplier - Sets the multiplier for the ATR to define the Supertrend's distance from price.
- A higher multiplier results in a wider distance, reducing sensitivity to minor price fluctuations.
- Default: 3.0 .
Supertrend Trailing Stop
"ENABLE TRAILING ON SUPERTREND": When this input is enabled, the trailing stop will follow the Supertrend line, helping to lock in profits and exit trades more efficiently.
The EA provides two different entry strategies based on Supertrend signals:
"ENTRY STRATEGY 1"
It places a buy trade: When the Supertrend turns green, indicating an uptrend.
It places a sell trade: When the Supertrend turns red, indicating a downtrend.
Best suited for traders who prefer breakout-based entries.
"ENTRY STRATEGY 2"
It places a buy trade: When the price pulls back to the green Supertrend line and bounces upward.
It places a sell trade: When the price pulls back to the red Supertrend line and reverses downward.
Designed for traders who prefer pullback-based entries for better risk-reward ratios.
Multiple Exit Strategies
The EA offers three different exit strategies, allowing traders to exit based on trend reversal or pullback confirmations:
"EXIT STRATEGY 1"
It closes a buy trade: When the Supertrend turns red (indicating a trend reversal).
It closes a sell trade: When the Supertrend turns green (indicating a trend reversal).
It is best for trend-following traders who want to ride the full trend.
"EXIT STRATEGY 2"
It closes a buy trade: When the price pulls back to the red Supertrend line and fails to continue upward.
It closes a sell trade: When the price pulls back to the green Supertrend line and fails to continue downward.
Ideal for traders who prefer earlier exits and dynamic profit protection.
EXIT STRATEGY 3
No automatic exits, allowing manual trade management or external strategies.
The Supertrend 1 settings enable traders to configure a reliable trend-following system tailored to their trading style. By adjusting the timeframe, period, and multiplier, users can fine-tune the indicator to suit fast-moving or slow-trending markets. This flexibility makes the Supertrend a valuable tool for identifying trends, potential breakouts, and reversals
Additional Features
Moving Average (MA) Filter on Higher Timeframe
The MA filter enables trades that align with the broader trend based on a higher timeframe moving average:
- Uptrend Condition - Allows buy trades when the close price is above the moving average.
- Downtrend Condition - Allows sell trades when the close price is below the moving average.
Loss Recovery Strategies
There are couple of loss recovery strategies popular in the market. Grid, Hedge and Martingale is most popular among them. In this EA, we have these strategies inbuilt. But only one loss recovery strategy can be active at a time. EA will not load, if we enable more than one loss recovery strategies. There is one important point regarding these strategies, we can not set stoploss if you enable Grid or Hedge strategy. It will close trades earlier and will compromise the purpose of these strategies. All of these strategies are by default disabled.
Grid Recovery Strategy
In a losing position, the EA places additional trades in a grid pattern, averaging down the entry price to capitalize on retracements.
Hedge Strategy
To balance exposure during a losing position, the EA opens opposing trades (hedges), allowing profit potential in countertrend movements.
Martingale Strategy
Increases lot size after a loss on each subsequent signal, aiming for overall profitability.
Position Sizing Based on Profit
This feature adjusts the position size dynamically based on cumulative profit, aiming to optimize gains in favourable conditions. As profit accumulates, the EA increases the position size, allowing for scaled growth and larger potential returns.
Day Filter
Specifies trading days to avoid trading during specific days of the week, aligning with your strategy’s optimal market conditions. You can disable the entire day filter.
Time Filter
Limits trading to specific times, preventing trades during low-liquidity periods or other non-ideal market conditions. You can disable entire time filter.
This ADX-based EA, with versatile entry and exit strategies and advanced risk management features, is a comprehensive tool designed to adapt to various market conditions while offering robust control over trading operations. Use each feature thoughtfully to align with your trading objectives and risk management strategy.