Overlay a small plot of a correlated asset of your choosing. Shrink/expand, Set vertical and horizontal position, plot multiple mini-plots via duplicate indicators with varied settings.
Plots the last X bars of any asset; including the live candle currently painting Useful for low time frame trading when you want to see correlated asset price movement right alongside the price movement you're watching. Useful for quick and simple comparisons; when you don't want the clutter of split screen or multi-pane view. Useful for backtesting. Price scale agnostic; just plots the shape of the recent price action, with several optional labels: Asset+timeframe | Live Price | Highest price over X bars | Lowest price over X bars. Works fine with all the assets i've tested it on.
~~User inputs~~ -number of bars to paint. -horizontal offset: plot to right X bars or to left X bars -vertical offset: shift up or down, shrink or expand; by using 2 'spacer' inputs -color/transparancy of candles and price labels. -width (pixels) of candle bodies. -choose to display price labels or not -choose to display asset label or not
Some improvements may be if anyone could incorporate:
1. Option to display 3 assets 2. Option to adjust timeframe for other assets.
twingall
⋅
@TradeShotsPro, Updated to work on multi timeframe now.. Note that it only shows 10 bars userInputTimeframe option. You can add more to the code (max of 40x security calls, but will be slower to load the more you add)
As regards plotting 3 assets, not doable without fundamental change in the code/ different method.
I found some issues while using different timezones ..... i.e 1. Open a non-active ticker chart 2. Now open an active chart i.e DXY (active approx. for full day) on different timeframe .........Then the candles are not similar for overlay chart.
and once again Thankyou .... I was missing the HTF feature very much .... Have a Great DAY !!
@twingall, ah i see; i don't think it has to do with timezones. Just that it will treat the last bar of overlay plot as the one that occured when the base asset stopped trading. So on ZW (wheat); stops trading at 14:00 NY time; and =>> the DXY overlay shows the last bar as the 14:00 DXY bar, even when there are more bars for DXY.. No easy fix for this, Keep an eye on the live price for activity on overlay. as clue to this happening.. Also maybe switch to Extended trading hours (ETH) over RTH where possible, may mitigate this some.
twingall
⋅
@TradeShotsPro, actually there seems to be an easy fix, will test it out over time and maybe add it as option. using 'barstate.isrealtime' you can stop it plotting overlay mini plots if/when the base asset is not live. If you want to try it out you can do the following: line 54 add: if barstate.isrealtime Indent by one tab lines 55-76 append to line 89: and barstate.isrealtime
jakubmarcinik
⋅
Hey @twingall, Thank you for this amazing script. I wanted to ask you if it would be possible to show in bar's style instead of candles. Thank you!
twingall
⋅
@jakubmarcinik, No I'm afraid i can't see a way to do this without a completely different approach. Thanks, T
Some improvements may be if anyone could incorporate:
1. Option to display 3 assets
2. Option to adjust timeframe for other assets.