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.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.