OPEN-SOURCE SCRIPT
Trend Signal A (v2.3) - 1D Trend + 1H Cross

This indicator combines multi-timeframe trend analysis using Heikin-Ashi candles
smoothed with a configurable moving average (EMA, HMA, ALMA, SMA, etc.).
📌 How it works:
- Calculates trend on a higher timeframe (Daily by default) using the last
CLOSED Heikin-Ashi candle only (no repainting).
- Looks for a trend cross confirmation on the chart's timeframe (designed for 1H).
- BUY signal: daily trend is bullish + bullish cross on the current timeframe.
- EXIT signal: bearish cross OR ATR-based dynamic stop loss, whichever comes first.
📊 Built-in panel:
Shows in real time the daily trend state, whether a position is currently open,
the unrealized PnL of the open trade, and the cumulative historical PnL
(simulated, no fees/slippage) since the indicator was loaded on the chart.
⚙️ Fully configurable: moving average type and length, higher-timeframe
selection, ATR multiplier for the stop loss, colors, and panel visibility.
⚠️ This script is an analysis tool, not financial advice. Past results shown
in the panel do not guarantee future performance. The PnL displayed is a
simplified simulation for educational purposes, not a full strategy backtest
(no fees, slippage, or position sizing are accounted for).
🙏 Credits: based on "Trend Indicator A" by DZIV (dzi_v_), published under
CC BY-NC-SA 4.0. This script is released under the same license.
smoothed with a configurable moving average (EMA, HMA, ALMA, SMA, etc.).
📌 How it works:
- Calculates trend on a higher timeframe (Daily by default) using the last
CLOSED Heikin-Ashi candle only (no repainting).
- Looks for a trend cross confirmation on the chart's timeframe (designed for 1H).
- BUY signal: daily trend is bullish + bullish cross on the current timeframe.
- EXIT signal: bearish cross OR ATR-based dynamic stop loss, whichever comes first.
📊 Built-in panel:
Shows in real time the daily trend state, whether a position is currently open,
the unrealized PnL of the open trade, and the cumulative historical PnL
(simulated, no fees/slippage) since the indicator was loaded on the chart.
⚙️ Fully configurable: moving average type and length, higher-timeframe
selection, ATR multiplier for the stop loss, colors, and panel visibility.
⚠️ This script is an analysis tool, not financial advice. Past results shown
in the panel do not guarantee future performance. The PnL displayed is a
simplified simulation for educational purposes, not a full strategy backtest
(no fees, slippage, or position sizing are accounted for).
🙏 Credits: based on "Trend Indicator A" by DZIV (dzi_v_), published under
CC BY-NC-SA 4.0. This script is released under the same license.
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.