The Robust filter indicatoris based on the robust filtering algorithm developed by the author using the multi-period averaged moving median. The algorithm for this averaging is shown in the last screenshot.
The indicator calculates and shows: 1. The direction of the trend; 2. Entry and exit points of positions; 3. StopLoss lines calculated from current price probability distributions and selected confidence levels; 4. Lot sizes based on the accepted risk level, deposit size and StopLoss position.
Indicator readings are visual, extremely simple and do not require comments. The purple line of the indicator marks an uptrend, the gold line expresses the area of uncertainty in the direction of the trend movement, and the purple line - the downtrend. The moments when the price movement direction changes are marked with arrows. Accordingly, the entry points for Buy when a green upward directed arrow appears, and for Sell when a purple downward arrow appears. StopLoss positions are shown with a red dotted line.
The indicator has all kinds of alerts. The indicator does not redraw. The indicator can be used both for trading scalper strategies and for long-term trading strategies.
Indicator settings.
- Price type - applied price. Values: Close price, Open price (default), High price, Low price, Median price ((high + low)/2), Typical price ((high + low + close)/3), Weighted price ((high + low + 2*close)/4).
- The averaging period - averaging period. Values: any integer (3 default).
- The averaging method - averaging method. Values: SMA (default), EMA, SSMA, LWMA.
- Line (arrows) thickness. Values: any integer (2 default).
- The Signal method - Type of trading signal alert. Values: No (default), Send alert, Print (in expert), Comment (in chart), Sound + Print, Sound + Comment, Sound, Push + Comment, Push, Mail + Comment, Mail.
- Confidence probability (CP*) Any real number between 0 and 1 (0.95 default).
- Calculate the lot size from the risk, deposit and CP*? – Calculate lot size based on risk, deposit and confidence level? Values: true, false (default).
- Deposit in $ (5000 $ default).
- Allowable losses in % - Permissible losses as a percentage of the deposit (2% default).
Screenshots.
![](https://c.mql5.com/6/869/3.png)