OPEN-SOURCE SCRIPT
Personal MTF Long Bias - 30D Momentum / 20D Range

MTF Long Bias is a higher-timeframe context indicator designed for discretionary long-side trading.
The script combines two simple filters:
1. 30D Momentum
Checks whether the confirmed higher-timeframe close is above or below the close from 30 bars ago. This is used as a simple momentum filter, not as a moving average.
2. 20D Range Position
Shows where current price sits inside the recent 20-bar high/low range. The default zones are:
- Bottom zone: lower 35%
- Top zone: upper 20%
- Middle zone: everything between them
The main idea is to separate market context from entry timing:
- 30D momentum defines whether long trades are favored or avoided.
- 20D range position helps identify whether price is near an extreme or in the middle.
- The final Long Bias table summarizes the condition as LONG OK, WAIT, or AVOID.
Default behavior:
- Uses confirmed daily data by default to reduce repainting.
- Shows the 20D range zones on the chart.
- Keeps the 30D momentum base optional through display modes.
- Labels and background colors are off by default to keep the chart clean.
This indicator is not an automated buy/sell system. LONG OK means the higher-timeframe context allows long setups, but actual entries, stops, position sizing, and risk management should be decided separately.
The script combines two simple filters:
1. 30D Momentum
Checks whether the confirmed higher-timeframe close is above or below the close from 30 bars ago. This is used as a simple momentum filter, not as a moving average.
2. 20D Range Position
Shows where current price sits inside the recent 20-bar high/low range. The default zones are:
- Bottom zone: lower 35%
- Top zone: upper 20%
- Middle zone: everything between them
The main idea is to separate market context from entry timing:
- 30D momentum defines whether long trades are favored or avoided.
- 20D range position helps identify whether price is near an extreme or in the middle.
- The final Long Bias table summarizes the condition as LONG OK, WAIT, or AVOID.
Default behavior:
- Uses confirmed daily data by default to reduce repainting.
- Shows the 20D range zones on the chart.
- Keeps the 30D momentum base optional through display modes.
- Labels and background colors are off by default to keep the chart clean.
This indicator is not an automated buy/sell system. LONG OK means the higher-timeframe context allows long setups, but actual entries, stops, position sizing, and risk management should be decided separately.
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.