Repaint and Signal Scorecard Pro MT4
- Indicatori
-
Allan Aparece Ninal
Sviluppo indicatori ed Expert Advisor per MetaTrader 5.
Come lavoro:
- Ogni indicatore viene controllato contro il repainting: i segnali vengono decisi solo su barre chiuse, e un test su ogni tick conferma che non cambiano in seguito. - Versione: 1.0
- Attivazioni: 10
Repaint and Signal Scorecard Pro MT4 is an indicator for MetaTrader 4 that checks another indicator's buy and sell signals. You name the indicator and the buffers that hold its signals. It tells you whether they repaint and how they did on the chart's history, after your own costs.
It places no trades. It only reads the other indicator. Run the free demo in the Strategy Tester on your own symbol before you decide.
It places no trades and promises nothing. It measures an indicator. A good score on history is not a forecast.
MetaTrader 4 edition: the same checks, panel and inputs as the MetaTrader 5 version. MetaTrader 4 passes an indicator's inputs as numbers and true/false only, so text inputs of the checked indicator keep their own defaults.
In plain words
Some indicators draw a buy arrow, and later move it or delete it. This is called repainting. On past bars the chart looks perfect, but the arrows you saw live were not those arrows.
This tool watches another indicator for you. When a bar closes, it writes down the signal as it was at that moment. On later bars it reads the signal again. If it changed, the indicator repainted.
It also scores the indicator's signals on the chart's history. Each signal is entered at the next bar's open and left after a set time or at a stop or target. Results are in ATR units, the average size of a bar's range, so symbols can be compared.
The two answers belong together. An indicator that repaints looks better on history than it was live.
What you see on the chart
- A panel in the top left corner shows the indicator you named and how it is read. Its colours follow a dark or light chart.
- The repaint check fills as new bars close. It lists the bars watched, the signals at close, and how many appeared later, vanished or flipped side.
- A verdict box reads "No repaint seen in N bars" or "Repaints: N changes in M bars". An amber cross marks each bar whose signal changed after it closed.
- The scorecard covers the last 2,000 closed bars: the number of signals, the win rate, the average win and loss, and the expectancy per signal. A green arrow marks each buy signal that was scored, and a red arrow each sell signal.
- With Pro, a table of other symbols, and a row that compares the first half of the signals with the second.
The arrows show the checked indicator's signals as they are now. If it repaints, its arrows move with it, and the amber cross shows where.
Worked example
The numbers come from the MetaTrader 4 tester, which runs the same engine in a test Expert Advisor.
ZigZag on EURUSD H1 was flagged: Repaints: 426 changes in 2,111 bars. 422 signals vanished and 4 appeared later. On XAUUSD H4 it showed 310 changes in 1,537 bars.
The built-in MACD cross (175 signals) and the MACD indicator as a line cross (156) showed 0 changes.
Key facts
| Type | Indicator for MetaTrader 4. A panel and marks on the price chart of the symbol you attach it to. |
| Reads | The buffers of one indicator you name, from MQL4\Indicators. It loads its own copy and leaves the one on your chart alone. |
| Repaint check | On each new bar it records the signal on the bar that just closed, as it was then. It reads the last 300 recorded bars again on each new bar. A change is counted and marked. |
| Scorecard | The last 2,000 closed bars. Entry at the next bar's open, exit after 10 bars or at an ATR stop or target. Results in ATR units after your costs. |
| Reload and timeframe change | The repaint record lives in memory and starts again from zero, then fills as bars close. The scorecard is calculated again from history, with today's values of the indicator. |
| Alerts | None. |
| Trades | No. It places no orders. |
| Other products needed | None. With no indicator named, it checks the built-in MACD 12/26/9 as an example. |
| Tested on | EURUSD, GBPJPY and XAUUSD at H1 and H4 (scorecard); ZigZag and MACD (repaint check). |
Quick start
- Put the indicator you want to check in MQL4\Indicators, and note its file name. A subfolder is written Folder\Name.
- Find its signal buffers: add it to a chart, open the Data Window (Ctrl+D) and move the mouse over a bar with an arrow. The rows that show a value only on signal bars are the signal buffers, numbered from 0.
- Attach this indicator to a chart. Type the file name in the first input, then pick the signal mode and the buffer numbers.
- Read the panel. The repaint verdict fills as new bars close. The scorecard is calculated from the last 2,000 closed bars.
- To watch months of bars in minutes, run it in the Strategy Tester in visual mode. At the end of a test the Journal gets the full count.
With no file name, it checks the built-in MACD 12/26/9 as an example. The first input to change is the file name.
Who it is for
For traders and developers who use or plan to buy indicators that draw buy and sell arrows. It tells you whether those arrows repaint and how they did on history.
Not a trading system: it places no trades and gives no signals of its own. Pro adds your own costs, the older half against the newer half, other symbols and a CSV export.
How it works under the hood
The repaint check
On every new bar, it writes down the signal of the bar that just closed (the bar set in "Bar the signal is read on"). On each later bar it reads the last 300 recorded bars again. At the end of a test it reads all of them once more.
A bar counts as a change in three cases. A signal appeared later (none at the close, one now). A signal vanished (one at the close, none now). A signal flipped side. The panel also shows how many bars after the close the latest change came.
It watches the bars that close while it runs. The bars before you attached it are not part of the repaint check.
The scorecard
- A signal is scored on its own. Overlapping signals are each counted. There is no position sizing and no compounding.
- Entry: the open of the bar after the signal bar.
- Exit: after N bars at the close (10 by default). With the ATR rule: at a stop of 1.5 x ATR or a target of 2.0 x ATR, else after N bars. When one bar touches both, the stop counts.
- ATR: the simple mean of the true range over 14 bars, on the signal bar.
- Result: (price gained or lost - spread and commission) / ATR. A result above zero is a win.
- Spread and commission come from your inputs. With the spread at -1 it takes the current spread of the symbol.
- A signal too new for its exit bar to have closed is not scored.
What Pro adds
- Costs: your own spread in points and a commission per lot (round turn), both taken off every result. The free edition uses the current spread only.
- First half and second half: the win rate and expectancy of the older half of the signals next to the newer half. A score that only holds in one half is a warning sign.
- Other symbols: the same scorecard for a list of symbols and timeframes, in a table on the panel. It works on a live chart, with up to 12 cells, each refreshed on its own new bars.
- CSV export: every scored signal (time, side, entry, exit, ATR, exit rule, result) and every changed signal, written to MQL4\Files\SignalScorecard.
Signal modes
| Signal mode | A buy is | A sell is |
|---|---|---|
| Arrows | a value in the buy buffer (0 and empty mean none) | a value in the sell buffer (-1 = no sell buffer) |
| Line cross | buffer A crosses above buffer B | buffer A crosses below buffer B |
| Level cross | buffer A crosses above the level | buffer A crosses below the level |
| Value | buffer A turns to the buy value (a colour index) | buffer A turns to the sell value |
It reads buffers. Arrows that an indicator draws as chart objects, with no buffer behind them, cannot be read.
Inputs
| Input | Default | What it does |
|---|---|---|
| Indicator file name | empty | The indicator in MQL4\Indicators. Empty = the built-in MACD 12/26/9 cross, an example. |
| Its inputs | empty | Comma separated, in its own order. Empty = its defaults (numbers and true/false). |
| Signal mode | Arrows | Arrows, Line cross, Level cross or Value. |
| Buy buffer / buffer A | 0 | Where the buy mark, or the first line, is. |
| Sell buffer / buffer B | 1 | -1 = no sell buffer (Arrows). |
| Level, Buy value, Sell value | 0, 0, 1 | For Level cross and Value. |
| Bar the signal is read on | 1 | 1 = the last closed bar. Use 2 or 3 for indicators that confirm late. |
| Recorded bars re-read | 300 | On every new bar. Older bars keep their verdict. |
| Closed bars to score | 2000 | How far back the scorecard looks. |
| Exit rule | after N bars | Or ATR stop / target (else after N bars). |
| Exit after N bars | 10 | Also the longest hold with a stop / target. |
| Stop, Target | 1.5, 2.0 x ATR(14) | Used with the ATR exit rule. |
| Spread, points | -1 | -1 = the current spread. |
| Commission per lot | 0 | Round turn, account currency. |
| Other symbols, timeframes | empty, H1,H4 | Comma separated. Empty = off. |
| Write CSV files | off | MQL4\Files\SignalScorecard. |
| Marks on the chart, Panel | on, on | Arrows and crosses; the panel. |
| Panel theme, colour-blind colours | auto, off | Follows a dark or light chart. |
| Debug log for bug reports | off | See Found a problem? |
Good first indicators to check
Two of my free indicators put their signals in buffers and state that they do not repaint, so they make an easy first test. You do not need either of them.
| Product | File name and settings |
|---|---|
| UT Bot Signal Alerts MT4 | UTBotAlerts\UTBotAlerts, Arrows, buffers 2 and 3 |
| MACD Multi Timeframe Signal Alerts MT4 | MacdMtf\MacdMtfSignals, Arrows, buffers 7 and 8 |
How it was checked
Repaint check in the MetaTrader 4 tester (the same engine in a test Expert Advisor):
- ZigZag on EURUSD H1 was flagged with 426 changes in 2,111 bars (422 vanished, 4 appeared later).
- ZigZag on XAUUSD H4 was flagged with 310 changes in 1,537 bars.
- 0 changes: the built-in MACD cross (175 signals) and the MACD indicator as a line cross (156).
Scorecard maths: an independent Python version rebuilt every signal's outcome from the bars. It covered EURUSD, GBPJPY and XAUUSD at H1 and H4, with both exit rules. All 12 files matched, with 1,398 signals per rule and 0 differences.
Validator-style runs of the indicator through iCustom with the default inputs on EURUSD H1, XAUUSD D1, GBPJPY H1 and EURUSD M15: 0 error lines. A missing indicator file gives one message and no values.
Not run in the tester: the Pro CSV export and the other-symbols table on MetaTrader 4.
Not measured: the result of any real trade. The scorecard is a measurement of signals with a simple, fixed exit.
Limits
- "No repaint seen" shows what happened on the bars it watched. It does not prove the indicator never repaints. One change is enough to show that it does.
- The scorecard uses the indicator's values as they are today. If the indicator repaints, the history looks better than live trading would have been.
- It is a measurement of signals with a simple, fixed exit. It is not a backtest of a strategy.
- It reads buffers only. Arrows drawn as chart objects cannot be read.
- Costs are the spread you set and the commission you enter.
- It sends no alerts.
FAQ
Does "No repaint seen" prove the indicator never repaints? No. It shows what happened on the bars it watched. Watch more bars, on more than one symbol, or run it in the Strategy Tester.
Why does Fractals show as repainting? A fractal needs two more bars to the right, so it appears two bars after its bar closed. That is a late signal. On history it sits on a bar where nobody could see it.
Are the scorecard numbers a backtest of a strategy? No. They are a measurement of signals with a simple, fixed exit. Overlapping signals are each counted.
Does it work in the Strategy Tester? Yes, in visual mode. A file name that cannot be loaded shows a message on the panel.
Can it read an indicator that is on the chart already? It loads its own copy by file name, with the inputs you give it. The copy on the chart is not touched.
Which indicator should I check first? One that keeps its signals in buffers and says it does not repaint. See Good first indicators to check.
Is there a MetaTrader 5 version? Yes, Repaint and Signal Scorecard Pro.
Try it first
Download the free demo from this page and run it in the Strategy Tester in visual mode on your own symbol. Name an indicator you know and compare the panel with what you see.
The free Repaint and Signal Scorecard MT4 gives the same repaint check and signal counts, without the Pro extras. It is a good way to learn the panel first. You do not need it to use Pro.
Works well with
These are workflow suggestions. I have not found that any pair gives better trading results. You do not need any of them.
| Product | How to use them together | Why |
|---|---|---|
| Indicator Arrow Trader Pro MT4 | Put the same indicator and buffers in the EA after you have checked them here. | The EA trades the buy and sell buffers of an indicator you name, on the closed bar, with a stop loss. Test it on a demo account first. |
| UT Bot Signal Alerts MT4 | Name its file in the scorecard (UTBotAlerts\UTBotAlerts, Arrows, buffers 2 and 3). | It keeps its signals in buffers and states that it does not repaint, so it is an easy first check. |
| Risk Position Tool MT4 | Pick a trade you like, then drag the entry and stop lines. The tool gives the lot for your risk. | It separates where you enter from how much you risk. The tool places no orders. |
Related products
- Repaint and Signal Scorecard Pro: the same indicator for MetaTrader 5.
- Repaint and Signal Scorecard MT4 (free): the same repaint check and signal counts, without the Pro extras.
- All my products on MQL5
Custom work
Want an EA that trades this indicator, a custom version of it, several of my indicators or EAs combined into one, an EA that trades another indicator you use (mine or another developer's), or a new indicator or EA of your own? Order it through MQL5 Freelance and choose me as the developer: order through Freelance. Send your requirements, rules and the flow or algorithm you want. The whole order, payment and delivery stay inside MQL5 Freelance.
Found a problem?
- In the inputs, set "Debug log for bug reports" to true.
- Repeat what went wrong.
- Open the Experts tab of the Terminal window. Copy the lines that start with "DBG" and paste them in a comment on this page. Add the symbol, the timeframe and the indicator you checked.
- Set the debug log back to false.
The debug lines never contain your account number, name, server, balance or equity.
If you find it useful, a short review on this page helps other traders find it.
Questions: use the comments on this page or send me a message on MQL5.
A measurement of past signals does not predict future ones, and trading carries a risk of loss.
