OPEN-SOURCE SCRIPT

9 EMA First Full Candle Entry + EMA Cross Exit (Strategy)

1 127
his strategy is designed to create a simple, mechanical trading system using only the 9 EMA on the 5-minute chart.

Entry Logic
A trade is entered on the first candle that closes completely on one side of the 9 EMA:

Long entry: the candle’s low is above the 9 EMA

Short entry: the candle’s high is below the 9 EMA

Only the first qualifying candle is used, preventing repeated entries during the same move.

Exit Logic
Once in a trade, the position is closed when price crosses back through the 9 EMA:

Long exits when price crosses below the EMA

Short exits when price crosses above the EMA

On the exit candle, the 9 EMA is highlighted yellow to clearly mark the exit point.

Visual Cues

Entry candle is colored yellow

EMA is normally orange and turns yellow on the exit candle only

No background shading, labels, or extra indicators

Purpose
This strategy is built to minimize decisions by:

Using a single timeframe (5-minute)

Using a single indicator (9 EMA)

Defining objective entry and exit rules

Designed for:

SPY and other highly liquid ETFs

Intraday trend continuation

Clean, rules-based execution with minimal discretion

Best performance is typically seen during strong trend periods and reduced during sideways or low-volatility conditions.

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.