OPEN-SOURCE SCRIPT
First Candle com Targets

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
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
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.