EMA-trend-filtered MACD cross signals with ATR-based stop, 1R–3R levels, and a chart-side position-size estimate.
Vision Grade
36.7
E · LOW confidence · E2
Published by AlgoNexa. AlgoNexa builds and documents evidence-first trading tools so you can inspect the logic before using it.About AlgoNexaIndicator library
Published Aug 22, 2026#ema#macd#atr#risk-management#position-sizing#indicator#tradingview#pinescript-v6
How it works
Read the logic before you use it.
1
When it signals
The default mode accepts a long when the 60-period EMA is above the 240-period EMA and MACD crosses above its signal line. A short requires the inverse conditions; the "Exact cTrader" mode additionally applies the MACD zero-line filter.
2
How levels are drawn
At the accepted signal bar's close, the script sets a stop one ATR-based risk distance away and plots targets at 1R, 2R, and 3R. The active lines extend rightward by the selected "Level Projection Bars" value.
3
How risk is framed
Suggested units equal account risk cash divided by stop distance and "Value of 1.0 Price Move per Unit." The setup status changes when the stop, TP3, or an accepted opposite signal closes the active setup.
Walkthrough
Watch how it reads the chart.
Live market chart
The logic on real candles.
Backtest evidence
What the numbers actually show.
E0 · Reconstructed reference
algonexta-reference · Yahoo Finance · EURUSD · 1h
Net profit
0.0143
Max drawdown
0.0120
Trades
72
Symbol · TF
EURUSD · 1h
Equity curve
Reference trades (144)▾
Time
Side
Price
Jun 26, 06:00 AM
long
1.13792
Jun 26, 05:00 PM
exit
1.13895
Jun 26, 05:00 PM
short
1.13895
Jun 29, 06:00 AM
exit
1.14051
Jun 29, 06:00 AM
long
1.14181
Jun 29, 08:00 AM
exit
1.14011
Jun 30, 12:00 AM
short
1.14194
Jun 30, 02:00 PM
exit
1.14364
Jun 30, 02:00 PM
long
1.14364
Jun 30, 04:00 PM
exit
1.14157
Jul 1, 01:00 AM
short
1.14077
Jul 2, 01:00 AM
exit
1.13843
Jul 2, 01:00 AM
long
1.13843
Jul 2, 12:00 PM
exit
1.14709
Jul 2, 10:00 PM
short
1.14312
Jul 3, 04:00 AM
exit
1.14458
Jul 3, 05:00 AM
long
1.14508
Jul 3, 09:00 AM
exit
1.14443
Jul 3, 09:00 AM
short
1.14443
Jul 3, 11:00 AM
exit
1.14589
Jul 6, 04:00 PM
long
1.14338
Jul 7, 05:00 AM
exit
1.14351
Jul 7, 05:00 AM
short
1.14351
Jul 8, 05:00 AM
exit
1.14233
Jul 8, 05:00 AM
long
1.14233
Jul 8, 09:00 AM
exit
1.14072
Jul 8, 11:00 AM
short
1.13999
Jul 8, 04:00 PM
exit
1.14168
Jul 8, 04:00 PM
long
1.14168
Jul 9, 12:00 PM
exit
1.14273
Jul 9, 12:00 PM
short
1.14273
Jul 9, 01:00 PM
exit
1.14416
Jul 9, 01:00 PM
long
1.14416
Jul 9, 07:00 PM
exit
1.14312
Jul 9, 07:00 PM
short
1.14312
Jul 10, 12:00 AM
exit
1.14429
Jul 10, 01:00 AM
long
1.14521
Jul 10, 07:00 AM
exit
1.14403
Jul 10, 07:00 AM
short
1.14403
Jul 13, 01:00 AM
exit
1.13963
Jul 13, 07:00 AM
long
1.14273
Jul 13, 02:00 PM
exit
1.14082
Jul 13, 03:00 PM
short
1.14064
Jul 14, 03:00 AM
exit
1.13973
Jul 14, 03:00 AM
long
1.13973
Jul 14, 11:00 PM
exit
1.14273
Jul 14, 11:00 PM
short
1.14273
Jul 15, 12:00 AM
exit
1.14377
Jul 15, 12:00 AM
long
1.14377
Jul 15, 07:00 AM
exit
1.14236
Jul 15, 07:00 AM
short
1.14260
Jul 15, 02:00 PM
exit
1.14416
Jul 15, 04:00 PM
long
1.14456
Jul 16, 04:00 AM
exit
1.14692
Jul 16, 04:00 AM
short
1.14692
Jul 17, 03:00 AM
exit
1.14404
Jul 17, 03:00 PM
long
1.14430
Jul 19, 11:00 PM
exit
1.14308
Jul 20, 10:00 AM
short
1.14351
Jul 21, 01:00 AM
exit
1.14181
Jul 21, 01:00 AM
long
1.14181
Jul 21, 02:00 PM
exit
1.14065
Jul 21, 02:00 PM
short
1.14090
Jul 22, 02:00 AM
exit
1.14090
Jul 22, 02:00 AM
long
1.14090
Jul 23, 04:00 AM
exit
1.14374
Jul 23, 09:00 AM
short
1.14155
Jul 23, 09:00 PM
exit
1.13767
Jul 24, 12:00 AM
long
1.13869
Jul 24, 12:00 PM
exit
1.13732
Jul 24, 06:00 PM
short
1.13727
Jul 26, 11:00 PM
exit
1.13866
Jul 26, 11:00 PM
long
1.13986
Jul 27, 11:00 AM
exit
1.13895
Jul 27, 11:00 AM
short
1.13895
Jul 28, 03:00 AM
exit
1.13779
Jul 28, 03:00 AM
long
1.13779
Jul 28, 05:00 AM
exit
1.13668
Jul 28, 05:00 AM
short
1.13701
Jul 28, 08:00 AM
exit
1.13753
Jul 28, 08:00 AM
long
1.13753
Jul 28, 09:00 AM
exit
1.13624
Jul 29, 10:00 AM
short
1.13882
Jul 29, 05:00 PM
exit
1.14024
Jul 29, 06:00 PM
long
1.14534
Jul 30, 06:00 AM
exit
1.14508
Jul 30, 06:00 AM
short
1.14508
Jul 30, 09:00 AM
exit
1.14702
Jul 30, 11:00 AM
long
1.14784
Jul 30, 10:00 PM
exit
1.15326
Jul 30, 11:00 PM
short
1.15260
Jul 31, 06:00 PM
exit
1.15340
Jul 31, 06:00 PM
long
1.15340
Aug 3, 06:00 AM
exit
1.15300
Aug 3, 06:00 AM
short
1.15300
Aug 4, 07:00 AM
exit
1.15141
Aug 4, 07:00 AM
long
1.15141
Aug 5, 06:00 AM
exit
1.15475
Aug 5, 10:00 PM
short
1.15580
Aug 5, 11:00 PM
exit
1.15607
Aug 5, 11:00 PM
long
1.15607
Aug 6, 03:00 AM
exit
1.15513
Aug 7, 04:00 AM
long
1.15274
Aug 7, 12:00 PM
exit
1.15779
Aug 10, 02:00 AM
short
1.15553
Aug 10, 07:00 AM
exit
1.15650
Aug 11, 12:00 PM
long
1.15460
Aug 12, 03:00 AM
exit
1.15394
Aug 12, 03:00 AM
short
1.15380
Aug 12, 09:00 AM
exit
1.15460
Aug 12, 11:00 AM
long
1.15473
Aug 12, 04:00 PM
exit
1.15311
Aug 12, 04:00 PM
short
1.15314
Aug 13, 08:00 AM
exit
1.15274
Aug 13, 08:00 AM
long
1.15274
Aug 13, 07:00 PM
exit
1.15314
Aug 13, 07:00 PM
short
1.15314
Aug 13, 11:00 PM
exit
1.15367
Aug 13, 11:00 PM
long
1.15367
Aug 14, 11:00 AM
exit
1.15685
Aug 14, 08:00 PM
short
1.15727
Aug 17, 12:00 AM
exit
1.15827
Aug 17, 12:00 AM
long
1.15835
Aug 17, 11:00 AM
exit
1.15955
Aug 17, 11:00 AM
short
1.15955
Aug 18, 02:00 PM
exit
1.15848
Aug 18, 02:00 PM
long
1.15848
Aug 18, 07:00 PM
exit
1.15781
Aug 18, 07:00 PM
short
1.15781
Aug 19, 02:00 AM
exit
1.15881
Aug 19, 02:00 AM
long
1.15861
Aug 19, 12:00 PM
exit
1.16376
Aug 20, 02:00 AM
short
1.16781
Aug 20, 07:00 AM
exit
1.16930
Aug 20, 09:00 AM
long
1.17110
Aug 20, 10:00 AM
exit
1.17000
Aug 20, 10:00 AM
short
1.17000
Aug 21, 05:00 AM
exit
1.17014
Aug 21, 05:00 AM
long
1.17014
Aug 21, 07:00 AM
exit
1.16945
Aug 21, 07:00 AM
short
1.16945
Aug 21, 08:00 AM
exit
1.17089
Aug 21, 12:00 PM
short
1.16945
Aug 21, 09:00 PM
exit
1.16781
⚠Executed from the versioned AlgoNexta IR on the same OHLC dataset used by the chart.
⚠This is an independent reference backtest; TradingView Strategy Tester remains the official comparison.
⚠This is an AI-reconstructed approximation of the script’s logic, not an execution of the exact source — verify the real script in TradingView Strategy Tester.
Vision Grade
What was measured, and how confident we are in it.
E2 · LOW confidence
VG-Signal — the measured component of Vision Grade. See the methodology for the Evidence Tier and Confidence axes it is always shown beside.
36.7
/ 100
Predictive power
22
Trading performance
17.1
Robustness
40
Risk
100
Signal-Based Performance
Signals
72
Win rate
43.1%
Profit factor
0.69
Max drawdown
0.0165
Robustness — chronological out-of-sample split
In-sample IC
—
Out-of-sample IC
—
OOS retention
—
OOS_SAMPLE_TOO_SMALL
ic here is a pooled event-conditional Spearman rank correlation (signal_strength vs forward return), not a cross-sectional factor IC — see methodology.
⚠Vision Grade measures the strength of statistical and trading-quality evidence. It does not predict future returns.
⚠A high Information Coefficient does not guarantee profitability.
⚠Trading Performance here is Signal-Based Performance, not an execution backtest against the original source.
⚠Historical results do not guarantee future performance.
⚠Only 72 valid signals (config minimum is 100) — results below are directional, not reliable.
Published by AlgoNexta, an evidence-first platform for building, reviewing, and documenting algorithmic trading tools. This page explains the script's actual logic and intended use; it does not promise profitability or replace verification in TradingView.
What it does
EmaMacdIce Risk Manager is an overlay indicator that combines an EMA trend filter with MACD signal-line crosses, then draws a risk framework for each accepted signal. It calculates an ATR-based stop-loss distance, three reward levels at 1R, 2R, and 3R, and an estimated position size based on the account and instrument-value inputs.
It is an indicator, not a TradingView strategy: it draws signals and reference levels but does not send orders or use strategy.entry() / strategy.exit().
What it watches
With the default Signal mode of EMA trend MACD crosses:
A buy signal requires the Short EMA to be above the Long EMA and the MACD line to cross above its signal line.
A sell signal requires the Short EMA to be below the Long EMA and the MACD line to cross below its signal line.
Default signal settings are Short EMA = 60, Long EMA = 240, MACD Fast = 12, MACD Slow = 26, and MACD Signal = 9.
The alternative Signal mode, Exact cTrader, adds a MACD zero-line filter:
Buys require a bullish EMA trend, a bullish MACD cross, and the MACD line below zero.
Sells require a bearish EMA trend, a bearish MACD cross, and the MACD line above zero.
Signals alternate by direction. After an accepted BUY, another BUY is ignored until an accepted SELL occurs, and vice versa.
How risk levels are calculated
On an accepted signal, the indicator uses the close of that signal bar as the reference entry price. The stop distance is:
ATR Period × SL ATR Multiplier
Defaults are ATR Period = 14 and SL ATR Multiplier = 1.5. For a long setup, the stop is below entry and the targets are above it; for a short setup, the placement is reversed.
SL is 1R from entry.
TP1 is 1R from entry.
TP2 is 2R from entry.
TP3 is 3R from entry.
The displayed size estimate uses Account Balance = 10000, Account Risk % = 1.0, and Value of 1.0 Price Move per Unit = 1.0 by default. Set the point-value input to the actual cash P/L produced by a one-unit position moving by 1.0 in price for your broker and market; the script cannot verify contract specifications for you.
Reading the chart
A teal/green upward triangle below a bar marks an accepted buy signal; a red downward triangle above a bar marks an accepted sell signal.
The fast EMA is colored with the current EMA trend: buy color when the short EMA is above the long EMA, sell color otherwise. The slow EMA is silver.
Show EMAs and Shade EMA Trend control the moving-average plots and the translucent fill between them.
The active setup shows a white entry line, red stop line, and three green target lines. Red shading marks the entry-to-stop risk area; green shading marks the entry-to-TP3 reward area.
The signal label shows BUY or SELL, the selected account risk percentage, and the calculated size estimate.
TP1 and TP2 lines become solid when reached. A setup closes when SL or TP3 is reached, or when an accepted opposite-direction signal reverses it. The status label then shows SL HIT, TP3 HIT, or REVERSED.
Show Level Prices adds or removes prices from the entry, stop, and TP3 labels. Level Projection Bars controls how far active levels extend, with a default of 35 bars.
Historical Setups controls the number of previous setup drawings retained, with a default of 50.
Markets and timeframes
The code does not restrict symbols or chart intervals. Because its stop and target distances are ATR-based and the size calculation depends on Value of 1.0 Price Move per Unit, it can be configured for different instruments, but that point-value input must match the instrument you trade. Test the EMA, MACD, and ATR settings on the specific market and timeframe you use.
Limitations
The indicator evaluates signals on the live bar, so a MACD cross can appear or disappear before that bar closes. For more stable interpretation, assess signals after bar close and configure alerts accordingly.
It assumes the entry occurs at the signal bar's close and does not evaluate stop or target hits on that same bar.
If a later bar touches both a stop and a target, the script checks the stop first. It cannot determine the true intrabar sequence from OHLC data alone.
The plotted SL/TP levels are visual calculations, not broker orders, trailing stops, partial exits, or guaranteed fills.
The indicator does not account for spread, slippage, commissions, liquidity, session rules, or broker-specific lot constraints.
It does not identify market structure, support/resistance, divergence, or discretionary trade context beyond its EMA and MACD conditions.
In the default "EMA trend MACD crosses" mode, BUY requires the 60 EMA above the 240 EMA plus a bullish MACD signal-line cross; SELL requires the opposite. "Exact cTrader" also requires MACD to be below zero for buys or above zero for sells.
How are the stop-loss and targets calculated?▾
The stop is set at ATR × the "SL ATR Multiplier" from the signal-bar close, using ATR 14 and a 1.5 multiplier by default. TP1, TP2, and TP3 are placed at 1R, 2R, and 3R from entry.
Does EmaMacdIce Risk Manager place trades?▾
No. It is a TradingView indicator that plots signals, projected levels, and a position-size estimate; it does not place orders or run as a TradingView strategy.
Does the indicator repaint?▾
Historical signals are based on completed chart bars, but MACD cross conditions can change while the current realtime bar is still forming. Waiting for bar close helps avoid acting on an intrabar cross that does not remain valid at close.
How do alerts work?▾
The script provides separate TradingView alert conditions for "EmaMacdIce Buy", "EmaMacdIce Sell", and "EmaMacdIce Setup Closed". Create an alert from the indicator's alert conditions and choose your preferred TradingView alert frequency.
Is this financial advice or proof of live performance?▾
No. This indicator is not financial advice, and its plotted levels are not evidence of live results. Use TradingView Strategy Tester or your platform's equivalent, together with your own execution data, as the source of truth for tested and live outcomes.
Want a version tuned to your market?
Describe the change in plain English and AlgoNexta rebuilds it as a fresh Pine v6 script — with its own explanation, evidence, and walkthrough.