OPEN-SOURCE SCRIPT

First Candle com Targets

277
This Pine Script implements a "First Candle of the Day" breakout strategy with targets:

Strategy Logic:

Identifies the first hourly candle of each trading day

Calculates the high, low, and range (distance) of that candle

Draws four horizontal levels on the chart:

High level (red solid line)

Low level (green solid line)

Buy target (blue dashed): High + Daily Range

Sell target (purple dashed): Low - Daily Range

Generates signals when price breaks above/below these levels:

BUY signal: When price closes ABOVE the Buy target (High + Range)

SELL signal: When price closes BELOW the Sell target (Low - Range)

Visualizes all levels with labels showing exact price values

Key Features:

Uses 1-hour timeframe

Lines extend 500 bars forward from the first candle

Automatic cleanup and update of levels each new day

Includes alert conditions for automated trading notifications

Marks the first candle of each day with a blue label

Trading Approach:

Breakout long when price exceeds the first candle's high by its full daily range

Breakout short when price falls below the first candle's low by its full daily range

The strategy assumes the first candle's range establishes intraday volatility boundaries

면책사항

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