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
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?