Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Telegram !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Indicateurs

Range Filter Buy and Sell - indicateur pour MetaTrader 5

DonovanWall, guikroth, tvenn
Publié par:
Thanh Trung Tran
Vues:
98
Publié:
Mise à jour:
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

A line-by-line MQL5 port of "Range Filter Buy and Sell 5min": the original Range Filter by DonovanWall, the simplified version by guikroth and the Pine v5 update by tvenn. It is published as open source on TradingView. All credit goes to those authors.

Same logic as the original:

  • Smoothed range = EMA(EMA(|close - close[1]|, period), 2 x period - 1) x multiplier. Each EMA is seeded with an SMA, the same as ta.ema .
  • Range filter: the line stays put until price moves beyond it by more than the smoothed range, then follows at that distance.
  • Upward / downward counters, then long and short conditions. A Buy or Sell is printed once per change of side, using the original CondIni logic.
  • High / low target bands at filter +/- range. Bar colors as in the original.

Inputs (original defaults): Sampling Period 100, Range Multiplier 3.0.


Made for MetaTrader 5:

  • No repainting. A Buy or Sell arrow is drawn when its bar closes and never moves or disappears afterwards. Tested bar by bar on 619,687 one-minute gold bars plus H1, M15, H4 and D1 charts: every value seen when a bar closed equals the final value.
  • Alerts on a new signal: popup, sound only, push notification to the MetaTrader 5 mobile app, or e-mail. Once per signal, on the closed bar.
  • Automatic colors: the original white "rising" color turns near-black on a light chart, so the line and bars stay visible on any chart theme.
  • Signal statistics panel. It buys at the bar after a Buy, sells after a Sell, and closes and reverses at the opposite signal. It shows the trades and win rate, the net result in money at your lot size after spread and commission, profit factor, average win and loss, longest losing streak, maximum drawdown, the open trade and the cost per trade. Click its header to fold it to one line; put it in any corner. Its colors follow your chart, dark or light.
  • Daily session filter for the statistics, in your own time zone (overnight windows allowed), with session shading and an optional close at session end. Off by default.
  • Trade marks on the chart: hover a mark for prices, exit reason and result.
  • Works on any symbol and timeframe.


For EA developers (iCustom): buffers 4 = Buy (price of the signal bar), 5 = Sell, 11 = filter value, 12 = smoothed range; EMPTY_VALUE means no value. Simplest call with the default inputs: iCustom(_Symbol, _Period, "TV_RangeFilter") . If you pass inputs, each input group heading counts as one parameter (pass an empty string for it). Signals on the closed bar (shift 1) are final.

The panel describes past signals so you can judge them yourself. It is not a backtest and not a promise of results.

License: free and open source under the Mozilla Public License 2.0 (MPL-2.0), the same as the original. The statistics panel code (TVStats5, inlined in this file) is MIT-licensed. Keep the license notices when you share or modify the code.

This is a visual tool. It does not place trades and does not predict prices. Test any rule built on it before you trade with it.

MTF Trend Dashboard — trend, position and volatility on six timeframes at a glance MTF Trend Dashboard — trend, position and volatility on six timeframes at a glance

One on-chart table for M15, H1, H4, D1, W1 and MN1: EMA slope, price vs EMA, Donchian position, ATR percentile and a combined UP / DOWN / RANGE regime. Completed bars only. Any symbol.

Breakeven and R-Trail Manager — break-even at +1R and R-multiple trailing for any trade Breakeven and R-Trail Manager — break-even at +1R and R-multiple trailing for any trade

Utility EA that moves the stop to break-even plus a small lock once a trade reaches +X R, then trails it N R behind price. Manual trades or any EA by magic number. Never opens trades and never widens a stop.

Tester vs Live Trade Matcher Tester vs Live Trade Matcher

A free, read-only MetaTrader 5 utility: it reads a Strategy Tester report (MT5 or MT4 .htm) and matches every backtest trade with your account history or with a second report. It shows the match rate, missed and extra trades, slippage, delay, real costs and how much of the backtest edge survives live.

Adaptive SuperTrend K-Means Adaptive SuperTrend K-Means

A faithful MetaTrader 5 port of the open-source TradingView indicator "Machine Learning Adaptive SuperTrend" by AlgoAlpha: K-means clusters recent ATR into high, medium and low volatility, and the SuperTrend band uses the centroid of the current cluster. No repainting, alerts, gradient fill and statistics table.