Repaint and Signal Scorecard MT4
- 지표
-
Allan Aparece Ninal
MetaTrader 5용 인디케이터와 전문가 어드바이저(EA)를 개발합니다.
작업 방식:
- 모든 인디케이터는 리페인팅 여부를 확인합니다. 신호는 마감된 봉에서만 결정되며, 모든 틱 테스트로 이후에 바뀌지 않는다는 것을 확인합니다.
- 모든 계산은 독립적인 기준 계산과 봉 단위로 비교합니다.
- 전략은 최적화에 사용하지 않은 데이터로 백테스트합니다. 우위가 없는 규칙은 그렇다고 분명히 밝히고 전략으로 판매하지 않습니다. - 버전: 1.0
Repaint and Signal Scorecard MT4 is a free MetaTrader 4 indicator that checks another indicator's buy and sell signals. You name the indicator and the buffers that hold its signals. It tells you whether those signals repaint, and how they did on the chart's history.
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.
Standalone: everything is built in. You do not need to buy or install any other product named on this page. With no indicator named, it checks the built-in MACD 12/26/9 as an example.
The two questions it answers
1. Does it repaint? On every new bar it writes down the signal on the bar that just closed, exactly as it was at that moment. On each later bar it reads those bars again. A signal that appeared later, vanished or flipped side after its bar closed is counted, and an amber cross marks that bar on the chart. The panel shows the counts, how many bars after the close the latest change came, and a verdict: No repaint seen in N bars or Repaints: N changes in M bars.
The check watches the bars that close while it runs. 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.
2. How did its signals do on history? Each signal on the last 2000 closed bars is scored on its own: entry at the next bar's open, exit after 10 bars at the close, or at an ATR stop or target if you choose that rule (when one bar touches both, the stop counts). Results are in ATR units after the spread, so symbols and timeframes can be compared. The panel shows the number of signals, the win rate, the average win and loss, and the expectancy per signal.
Read the two answers together. The scorecard uses the indicator's values as they are today. If the indicator repaints, its history shows signals that were not there live, so the scorecard looks better than live trading would have been. The panel says so when it found changes.
What you see on the chart
- A panel in the top-left corner: the indicator and how it is read, the repaint check with its verdict, and the scorecard. Its colours follow a dark or light chart.
- A green arrow under each buy signal and a red arrow over each sell signal that was scored.
- An amber cross over a bar whose signal changed after the bar closed.
The arrows show the checked indicator's signals as they are now, the ones the scorecard uses. If that indicator repaints, its arrows move with it, and the amber cross shows where. An indicator that does not repaint leaves every arrow where it was.
How to set it up
- Put the indicator you want to check in MQL4\Indicators, and note its file name (a subfolder is written Folder\Name).
- Find the buffers that hold its signals: 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 in the order shown.
- Add this indicator to the same chart, type the file name, pick the signal mode and the buffer numbers.
| 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 | Description |
|---|---|---|
| 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 | - |
| 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; 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 | - |
| 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) | - |
| Marks on the chart, Panel | on, on | - |
| Panel theme, colour-blind colours | auto, off | - |
| Debug log for bug reports | off | see Found a problem? |
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, 426 changes in 2,111 bars (422 vanished, 4 appeared later), and on XAUUSD H4, 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.
Scorecard maths: an independent Python version rebuilt every signal's outcome from the bars. On EURUSD, GBPJPY and XAUUSD at H1 and H4, both exit rules, all 12 files matched: 1,398 signals per rule, 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.
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 |
Questions
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. One change is enough to show that an indicator repaints.
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 have seen it.
Are the scorecard numbers a backtest of a strategy? They are a measurement of signals with a simple, fixed exit. Overlapping signals are each counted, there is no position sizing and no compounding.
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.
Found a problem?
- In the inputs, set "Debug log for bug reports" to true.
- Repeat what went wrong.
- Open the Experts tab in the Toolbox. Copy the lines that start with "DBG" and paste them in a comment on this page, with 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 it helps you, 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.
