TradingView
twingall
14 Ags 2022 pukul 12.43

Williams % Range overlay mini plot 

E-mini S&P 500 FuturesCME

Deskripsi

Plots Williams Percent Range over bought/oversold indicator as a small overlay in top right corner.
De-clutter chart when all you're interested in is the real-time W%R to 'give permission' to enter a trade.
i.e. to remove the Williams %R lower pane from the above chart completely.

~~User Inputs~~
~W%R length
~Number of bars to show (default is last 6 bars)
~Plot offset (horizontal position of the plot; can be negative)
~Line color and thickness
~Show/hide plot title

~~tips~~
~in line 26, edit the multiplier (3*), to compress/expand the vertical size of the plot

Catatan Rilis

Added multi-timeframe support: Choose two higher timeframes to plot adjacent to the current timeframe plot

Catatan Rilis

fixed spacing issue

Catatan Rilis

option to show HTF or only show single plot (current timeframe)

Catatan Rilis

cleaned up formatting options to allow for minimalist view

Catatan Rilis

-Added Filter conditions for Overbought/Oversold: 1 timeframe, 2 timeframes or all 3 timeframes in agreement. Highlight candle bodies and/or background when this occurs.
-Added -80 and -20 reference lines

(note: bgcolor and barcolor are the only options for highlighting, since label, plotchar, plotshape all mess up the scaling of the miniplot)

Demo of Filter condition: triple timeframe agreement Overbought W%R

Catatan Rilis

-update chart

Catatan Rilis

-update comments

Catatan Rilis

-update chart
Komentar
twingall
something like this added:
if WPR >= -80 l=label.new(bar_index,high, "",xloc=xloc.bar_index, style=label.style_xcross, textcolor=color.red, size = size.small, textalign=text.align_left) label.delete(l[1])

.. but adding more drawings in this way messes up the scale/position of the mini plots..
..could write as seperate indicator; or could try using: alertcondition(condition, title, message)
twingall
@twingall, correction: label.delete(l "squarebracket" 1 "squarebracket" )
(annoyingly this comment text editor deletes anything placed in square brackets)
EmanuelAlho
Hello, fantastic work, thank you!!
Its possible to update it, for as soon willy goes overB or overS prints a cross under the candle, i tried to do with but without success, to hard for my head :D
It would be great!! Thanks anyway.
Cheers.
twingall
@EmanuelAlho, updated to highlight candle when OB/OS(single, double or triple agreement conditions available). Cross or labels won't work (scaling issues) so used bgColor and/or candle body color
EmanuelAlho
@twingall, great, thank you! it's great with the background color too.
ty.
Lebih lanjut