RagingRocketBull

SadLittleThings Price Compare With Offset MTF by RRB

SadLittleThings Price Compare With Offset MTF by RagingRocketBull 2018
Version 1.0

This indicator lets you compare multiple assets across different timeframes, supports offsets and alpha multipliers.
Standard TradingView Compare doesn't have Offset/Timeframe/Multiplier options, hence this indicator.

Features:
- compare current asset's price with 2 custom ext OHLC sources
- plot sources as lines/bars/candles
- use offset:
- for lines - both positive/negative offsets, unlimited
- for bars/candles - only positive offsets <= 5000
- specify timeframe for each source
- uses timeframe textbox instead of input resolution dropdown to allow for 240 120 and other custom TFs
- support for timeframes in H: H, 2H, 4H etc
- show/hide sources
- colorize sources
- convert source price to 1000s, mlns, or blns using alpha multiplier
- total bars counter

Notes on using offsets:
- Max offset is defined by study max_bars_back which is limited to 5000 for free accounts. This variable specifies the number of history bars an indicator can access.
- if you see the 'internal server study error' => one of the indexes of ohlc series is out of bounds (i.e. close) => decrease the offset <= 5000 or switch to line type
- you will be limited only by the total number of bars in history (n) +/- 1 full screen of empty bars
- you can't scroll past the beginning of history - 1 empty screen and past the end of history + 1 empty screen to be able to still see the line with applied offset
- before applying a large offset, scroll back long enough to make sure you have enough history loaded
- if you have a long history the indicator will get slower, its UI less responsive. Reloading the page may fix that.
- you will not see source's history past the beginning of the current asset - open the chart with the longest history first (i.e. BLX, not COINBASE)
- Make sure that the Left Price Scale shows up with Auto Fit Data enabled. You can reattach the indicator to a different scale in Style.
- you may not be able to plot intraday TFs < current TF, because free accounts are limited to TFs >= D1 (i.e. D, 2D, 3D, W), but you can still plot, say, H4+ on a lower TF H1 chart

1. uses plot*, security, change
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?