OPEN-SOURCE SCRIPT
Tristan's W%R Strategy

Overview:
This strategy uses the raw Williams %R oscillator to automatically generate buy and sell signals based on overbought and oversold levels. It is session-aware, allowing you to restrict trades to specific market hours (New York, London, or Asia).
Key Features:
How to Use:
Note:
This script uses the raw W%R signal vs the smoothed one because I found it to be more accurate for automated trading.
Every qualifying signal results in a trade, even if positions are already open.
This strategy uses the raw Williams %R oscillator to automatically generate buy and sell signals based on overbought and oversold levels. It is session-aware, allowing you to restrict trades to specific market hours (New York, London, or Asia).
Key Features:
- Buy Signal: Fires whenever the raw Williams %R is at or below the oversold level (default −100).
- Sell Signal: Fires whenever the raw Williams %R is at or above the overbought level (default 0).
- Session Filtering: Only triggers trades during the selected session (All, New York, London, or Asia).
- Pyramiding: Allows multiple trades to stack, so every qualifying signal results in a new trade.
- Alerts: Optional alerts for automation via webhook or broker integration.
- Session Highlight: Background shading indicates when the selected session is active.
How to Use:
- Set the Williams %R length, overbought, and oversold levels to match your trading style.
- Select the session you want the strategy to be active in (New York, London, or Asia).
- Enable alerts if you plan to automate trades with an API.
- Add the strategy to your chart. It will execute trades automatically whenever the raw %R meets the configured thresholds during the selected session.
- Adjust pyramiding if you want to limit the number of stacked trades per session.
Note:
This script uses the raw W%R signal vs the smoothed one because I found it to be more accurate for automated trading.
Every qualifying signal results in a trade, even if positions are already open.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.