Skip to content
← Indicator library
tradingviewtrendindicatorpinescript-v6

E2E Test Indicator

A TradingView EMA crossover overlay that marks 9/21 EMA bullish and bearish crosses.

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 4, 2026#ema#moving-average#crossover#trend#indicator#pinescript-v6#tradingview

How it works

Read the logic before you use it.

1

When it signals

A bullish event occurs when the 9-period EMA crosses above the 21-period EMA. A bearish event occurs when the 9-period EMA crosses below the 21-period EMA.

2

What confirms it

The script provides no secondary filter or confirmation rule. The plotted triangle is the crossover condition itself, based on close-price EMAs.

3

How alerts are framed

TradingView alert conditions are available as “Bull cross” and “Bear cross.” The indicator does not define entries, exits, stops, targets, or position size.

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.0106

Max drawdown

0.0086

Trades

46

Symbol · TF

EURUSD · 1h

Equity curve

Reference trades (92)
TimeSidePrice
Jun 9, 05:00 AMlong1.15473
Jun 9, 11:00 AMexit1.15737
Jun 9, 09:00 PMshort1.15420
Jun 10, 05:00 AMexit1.15546
Jun 10, 06:00 AMlong1.15540
Jun 10, 11:00 AMexit1.15408
Jun 10, 08:00 PMshort1.15393
Jun 11, 01:00 AMexit1.15556
Jun 11, 07:00 PMlong1.15821
Jun 12, 05:00 AMexit1.15648
Jun 15, 08:00 PMshort1.15915
Jun 16, 08:00 AMexit1.16045
Jun 16, 09:00 AMlong1.16050
Jun 17, 10:00 AMexit1.16009
Jun 17, 10:00 AMshort1.16009
Jun 17, 06:00 PMexit1.15575
Jun 19, 05:00 PMlong1.14784
Jun 21, 11:00 PMexit1.14650
Jun 22, 03:00 AMshort1.14600
Jun 22, 07:00 PMexit1.14261
Jun 25, 03:00 AMlong1.13727
Jun 25, 06:00 AMexit1.13593
Jun 25, 10:00 AMshort1.13482
Jun 25, 01:00 PMexit1.13685
Jun 25, 02:00 PMlong1.13779
Jun 26, 01:00 AMexit1.13631
Jun 26, 02:00 AMshort1.13623
Jun 26, 03:00 AMexit1.13740
Jun 26, 03:00 AMlong1.13740
Jun 26, 08:00 AMexit1.14087
Jun 29, 03:00 AMshort1.13882
Jun 29, 05:00 AMexit1.13973
Jun 29, 05:00 AMlong1.13973
Jun 29, 04:00 PMexit1.14280
Jun 30, 04:00 AMshort1.13934
Jun 30, 07:00 AMexit1.14079
Jun 30, 02:00 PMlong1.14364
Jun 30, 04:00 PMexit1.14157
Jul 1, 03:00 AMshort1.14077
Jul 1, 12:00 PMexit1.13744
Jul 2, 07:00 AMlong1.14116
Jul 2, 12:00 PMexit1.14694
Jul 6, 01:00 AMshort1.14325
Jul 6, 06:00 PMexit1.14454
Jul 6, 06:00 PMlong1.14469
Jul 7, 05:00 AMexit1.14370
Jul 7, 07:00 AMshort1.14299
Jul 7, 11:00 AMexit1.14415
Jul 8, 07:00 PMlong1.14312
Jul 10, 02:00 AMexit1.14577
Jul 10, 11:00 AMshort1.14351
Jul 12, 11:00 PMexit1.14057
Jul 13, 10:00 AMlong1.14390
Jul 13, 01:00 PMexit1.14210
Jul 13, 02:00 PMshort1.14064
Jul 14, 11:00 AMexit1.14103
Jul 14, 11:00 AMlong1.14103
Jul 14, 12:00 PMexit1.14585
Jul 15, 11:00 AMshort1.14168
Jul 15, 12:00 PMexit1.14325
Jul 15, 01:00 PMlong1.14364
Jul 15, 05:00 PMexit1.14762
Jul 16, 02:00 PMshort1.14469
Jul 20, 04:00 AMexit1.14482
Jul 20, 04:00 AMlong1.14482
Jul 20, 06:00 AMexit1.14385
Jul 20, 06:00 AMshort1.14377
Jul 20, 07:00 AMexit1.14490
Jul 22, 01:00 PMlong1.14168
Jul 22, 10:00 PMexit1.14092
Jul 22, 10:00 PMshort1.14103
Jul 22, 11:00 PMexit1.14142
Jul 22, 11:00 PMlong1.14142
Jul 23, 03:00 AMexit1.14324
Jul 23, 11:00 AMshort1.13986
Jul 23, 09:00 PMexit1.13727
Jul 27, 12:00 AMlong1.14051
Jul 27, 11:00 AMexit1.13919
Jul 27, 01:00 PMshort1.13766
Jul 28, 03:00 PMexit1.13922
Jul 28, 03:00 PMlong1.14038
Jul 28, 06:00 PMexit1.13901
Jul 29, 12:00 PMshort1.13804
Jul 29, 01:00 PMexit1.13928
Jul 29, 01:00 PMlong1.13934
Jul 29, 06:00 PMexit1.14399
Jul 31, 12:00 PMshort1.14929
Jul 31, 04:00 PMexit1.15198
Jul 31, 04:00 PMlong1.15207
Aug 3, 03:00 PMexit1.15128
Aug 3, 03:00 PMshort1.15128
Aug 4, 04:21 AMexit1.15115

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.

Vision Grade requires a reference backtest with enough reconstructed entries to measure — not available for this script yet.

Full breakdown

How the script behaves.

About AlgoNexta

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

E2E Test Indicator is a chart-overlay trend tool built around two exponential moving averages (EMAs): a 9-period EMA and a 21-period EMA. It plots both averages and marks the bars where the faster 9 EMA crosses the slower 21 EMA.

Conditions it watches

  • A bullish cross occurs when the 9 EMA crosses above the 21 EMA.
  • A bearish cross occurs when the 9 EMA crosses below the 21 EMA.

The script uses the chart's closing prices to calculate both EMAs. It has no user-configurable inputs in its current version.

How to read the chart

  • Blue line: 9-period fast EMA.
  • Orange line: 21-period slow EMA.
  • Green upward triangle below a bar: the fast EMA crossed above the slow EMA.
  • Red downward triangle above a bar: the fast EMA crossed below the slow EMA.

TradingView alert conditions are included for both events: “Bull cross” sends the message “EMA bull cross,” and “Bear cross” sends the same-direction bearish event message when selected in the alert dialog.

Timeframes and markets

The code does not restrict symbols or timeframes, so it can be applied to any TradingView chart. Because 9/21 EMA crosses can occur more frequently on lower timeframes and react more slowly on higher timeframes, compare its behavior on the market and interval you actually trade before relying on a signal.

Limitations

  • This is an indicator, not a strategy: it does not place orders, define position size, stops, or profit targets.
  • EMA crossover signals are based on moving averages, so they can lag price after a move has started.
  • In sideways or choppy conditions, repeated crosses may occur without a sustained directional move.
  • Cross conditions are evaluated from chart data; the current bar can change before it closes. For closed-bar confirmation, assess signals after the bar is complete.
  • It does not evaluate volume, support/resistance, volatility, market structure, or broader trend context.

Source

pinescript-v6 · full source

e2e-test-indicator-2.pine
// ============================================================================
// © algonexta
// This script is for education and research; it does not guarantee results.
// Verify this source in TradingView before use.
// ============================================================================

//@version=6
indicator("E2E Test Indicator", "E2E", overlay = true)
fast = ta.ema(close, 9)
slow = ta.ema(close, 21)
plot(fast, color = color.blue)
plot(slow, color = color.orange)
bullCross = ta.crossover(fast, slow)
bearCross = ta.crossunder(fast, slow)
plotshape(bullCross, style = shape.triangleup, location = location.belowbar, color = color.green)
plotshape(bearCross, style = shape.triangledown, location = location.abovebar, color = color.red)
alertcondition(bullCross, "Bull cross", "EMA bull cross")
alertcondition(bearCross, "Bear cross", "EMA bear cross")

FAQ

Common questions.

What does E2E Test Indicator detect?

It detects crosses between a 9-period EMA and a 21-period EMA calculated from close prices. A cross above is marked as bullish and a cross below is marked as bearish.

What do the blue, orange, green, and red visuals mean?

The blue line is the 9 EMA and the orange line is the 21 EMA. Green upward triangles mark bullish crosses below bars, while red downward triangles mark bearish crosses above bars.

Does this indicator repaint?

The script does not use future-bar data or pivot-based lookahead logic. However, an EMA cross can appear or disappear while the current candle is still forming, so closed-bar confirmation is prudent.

Does E2E Test Indicator place trades or include risk management?

No. It is an overlay indicator only; it does not call strategy orders and has no stop-loss, take-profit, or position-sizing logic.

How do alerts work?

Create a TradingView alert and choose either the “Bull cross” or “Bear cross” condition. Those conditions trigger when the 9 EMA crosses above or below the 21 EMA, respectively.

Is this financial advice, and where should I verify results?

No, this indicator is not financial advice. It is not a TradingView strategy, so use TradingView Strategy Tester or your own validated testing process as the source of truth for simulated and live results.

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.

Build your own version

Educational content only — not financial advice. TradingView is the source of truth for live data, compilation, and Strategy Tester results.