UT Bot Alerts with Signal Stats
- Индикаторы
- Версия: 1.10
A line-by-line port of "UT Bot Alerts" by QuantNomad (Pine v4, 2020). The idea is by HPotter and the first version by Yo_adriiiiaan. The original is published as open source on TradingView. All credit goes to those authors.
The logic is exactly the original's:
- ATR is atr(c) = Wilder RMA seeded with an SMA. The built-in iATR is not used.
- Trailing stop follows the original nested iff / nz recursion:
- It ratchets up while price stays above the stop.
- It ratchets down while price stays below the stop.
- It resets to price ∓ Key Value × ATR when price crosses the stop.
- Buy = source above the stop and crossing it upward. Sell = the opposite.
- Bar colors: green above the stop, red below it.
- Optional Heikin Ashi source (HA close = OHLC/4).
Inputs (original defaults): Key Value 1, ATR Period 10, Heikin Ashi off.
Added for MT4:
- The trailing-stop line (the original only colors bars).
- 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:
- trades, win rate, net points / pips / USD after spread + commission
- profit factor, longest losing streak, max drawdown
- the open trade and the cost per trade
- Daily session filter. Start / end time in your own time zone; overnight windows are allowed. It optionally closes at session end and shades the session on the chart. It is off by default (the panel counts the whole day); set Use_Session = true and your hours to use it.
- Trade marks. Every counted trade is drawn on the chart. Hover a mark for prices, exit reason and result.
- Alerts on new signals.
Buffers for EAs ( iCustom ): 3 = Buy, 4 = Sell, 13 = trailing stop.
The panel describes past signals so you can judge them yourself. Please check the costs line: on 1–5 minute charts the spread and commission per trade are large compared with the average move between two signals. The panel is not a backtest and not a promise of results.
Source code and license: free and open source under the Mozilla Public License 2.0 (MPL-2.0), the same as the original. The full MQL4 source code is published in the MQL5 Code Base by the same author.
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.
