OPEN-SOURCE SCRIPT
Range Position

Range Position answers one question at every bar: where is price inside the range it has just travelled? For each of seven lookback windows (the last 1, 3, 5, 15, 60 and 240 closed one-minute bars, plus the session since 18:00 ET) the indicator draws the window high and low on the price chart and computes the position of the current close as a percentage of that range, 0 at the low and 100 at the high. Because a long taken near the low and a short taken near the high are the same situation from the trader's side, the reading is also expressed side-relative as "ext": a BUY's ext is the distance up from the low, a SELL's ext is the distance down from the high, so a low ext on either side means you are entering at the favourable extreme rather than chasing. Each window shades that favourable zone as a band, green from the low for buys and red from the high for sells, with its own adjustable width, so "4h ext ≤ 35" is simply price sitting inside the green band of the 4h window. All windows are built from the one-minute series via request.security, so the levels are identical whether the chart is on 1m, 5m or 1h. A top-right table shows the live BUY and SELL ext for every window and highlights the ones inside their band, one window is selectable as the alert window with triangle markers and two alert conditions on band entry, and an optional JSON alert() payload carries the window, side, range position, ext, and window high and low for webhook use. Only closed bars are ever included, so the bar you are in never moves its own reference range.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.