TradingView
LazyBear
26 apr 2015 01:22

Range Identifier [LazyBear] 

Advanced Micro Devices, Inc.NASDAQ

Beskrivning

---- May 05 2015 -----

Added support for filtered ranges:
RID V3 : pastebin.com/Z11JYVQK

RIDv3 has full backward compatibility (!?), meaning all my descriptions below still apply for V3.
-- In addition, I have added a NON-OVERLAY mode, which can be put in its own pane, that shows the number of bars in the current range.
-- in Overlay mode, you can switch on/off filtering ranges based on the bar count.

Sample chart:


---- April 30 2015 -----

Updated the source to show a connected Midline only when ConnectRanges option is enabled.
Updated src: pastebin.com/xgweVbrC

Sample chart:


---- Original Desc ----

This is a simple indicator that highlights the price ranges. Very helpful in determining a breakout.

There are many ways to incorporate this in to your strategy. One simple idea could be to buy if the price breaks above a range, when above the specified EMA, and to SELL when it breaks down from a range below the EMA.

All options are configurable. Alerts can be setup using the specified plot names.

By default it shows only the ranges, but can be configured to show the full "channel". Chart below shows connected ranges with highlights ON.


Range highlighting can be turned OFF. Chart below shows that:


Note for the pine coders:
As you probably noticed in the charts above, single range is showing 2 colors(red/green). Fill() doesn't accept a series for colors, so I worked around this using two fill() statements with a moving DUMMY line, to get this mixed color effect.

List of my public indicators: bit.ly/1LQaPK8
List of my app-store indicators: blog.tradingview.com/?p=970
Kommentarer
LazyBear
Some interesting ranges :)

BTCUSD ranges before the bull run


GOOGL broke above the range


YHOO at the bottom of its range


EA testing the range top
scalpingengine
@LazyBear, thank you sir
NEKSUS_
Please do to the middle line is visible only in the areas of Range and not on the entire chart
jpegshare.net/code/e1/95/e19560bf21da7d5125effbb07e9f6330.gif.html
LazyBear
Here you go. Updated source here -> pastebin.com/xgweVbrC

NEKSUS_
Many Thanks )
NEKSUS_
how about a filter "area in which at least X bars" ?
For example at least 5 bars Range
jpegshare.net/15/12/1512b6bc6453af02540353f2c83a4077.gif.html
LazyBear
This cannot be done now, using the documented APIs, definitely not in realtime.
LazyBear
May be another pane showing the count of bars inside the range and marking the invalid ones...this might work.
NEKSUS_
in this case .... maybe possible to realize color setting?
For example, if the filter is set to 5 bars in range.
Zones in which less than 5 bars are painted a dull color, and areas where the 5 bars and more, painted a bright color
LazyBear
I really like the features you are suggesting :)

Here's an updated version: pastebin.com/Z11JYVQK (I am gonna release this as a separate indicator as the feature set delta from original has exploded!)

Sample chart:


RIDv3 has full backward compatibility (!?), meaning all my descriptions above still apply for V3.
-- In addition, I have added a NON-OVERLAY mode, which can be put in its own pane, that shows the number of bars in the current range.
-- in Overlay mode, you can switch on/off filtering ranges based on the bar count.

Lot of customization possible, hope this helps you in your trades.
Mer