TradingView
Dreadblitz
Dec 7, 2019 3:48 PM

Red and Green Ignored Bar by Oliver Velez 

Nike, Inc.NYSE

Description

On this occasion I present a script that detects Ignored Red Candles and Ignored Green Candles, basically it is a Price Action event that indicates a possible continuation of the current trend and gives the opportunity to climb it with a Very tight risk, before delving into detail I would like to leave this note:

Note: the detection of this event does not guarantee that the signal will be good, the trader must have the ability to determine its quality based on aspects such as trend, maturity, support / resistance levels, expansion / contraction of the market, risk / benefit, etc, if you do not have knowledge about this you should not use this indicator since using it without a robust trading plan and experience could cause you to partially or totally lose your money, if this is your case you should train before If you try to extract money from the market, this script was created to be another tool in your trading plan in order to configure the rules at your discretion, execute them consistently and have AUTOMATIC ALERTS when the event occurs, which is where I find more value because you can have many instruments waiting for the event to be generated, in the time frame you want and without having to observe the mer When the alert is generated, the Trader should evaluate the quality of the alert and define whether or not to execute it (higher timeframes, they can give you more time to execute the operation correctly).

Let's continue….

This event was created by Oliver Velez recognized trader / mentor of price action, the event has a very interesting particularity since it allows to take a position with a very limited risk in trend movements, this achieves favorable operations of good ratio and small losses when taking An adjusted risk, if the trade works, a good ratio is quickly achieved and we agree with a key point in the “Keep small losses and big profits” trading, this makes it easier to have a positive mathematical hope when your level of Success is not very high, so leave you in the field of profitability.

THE EVENT:

The event has a bullish configuration (Ignored Red Candle) and a bearish configuration (Ignored Green Candle), below I detail the “Hard” rules (later I explain why “Hard”):

1- Last 3 bars have to be GREEN-RED-GREEN (possible bullish configuration) or RED-GREEN-RED (possible bearish configuration), the first bar is called Control Bar, the second is called Ignored Bar and the third Signal Bar as shown in the following image:



2- Be in a trend determined by simple moving averages (Slow of 20 periods and Fast of 8 periods), as a general rule you can take the direction of MA20 but the Trader has to determine if there is a trend movement or not.

3- Control bar of good range, little tail and with a body greater than 55%.

4- Ignored bar preferably narrow range, little tail and that is located in the upper 1/3 of the control bar.

5- Signal bar cannot override the minimum of the ignored bar.

6- Activation / Confirmation of event by means of signal bar in overcoming the body of the ignored bar.



Some examples of ignored bars (with “Hard” and “Flexible” rules):






Features and configuration of the indicator:

To access the indicator settings, press the wheel next to the indicator name VVI_VRI "Configuration options".

- Operation mode (Filtering Type):

• Filtering Complete: all filters activated according to the configuration below.
• Without Filtering: all filters deactivated, all VRI / VVI are displayed without any selection criteria.
• Trend Filter only: shows only VRI / VVI that are in accordance with what is set in “Trend Settings”

- Configuration Moving Averages:

• See Slow Media: slow moving average display with direction detection and color change.
• See Fast Media: display of fast moving average with direction detection and color change.
• Type: possibility to choose the type of media: DEMA, EMA, HullMA, SMA, SSMA, SSMA, TEMA, TMA, VWMA, WMA, ZEMA)
• Period: number of previous bars.
• Source: possibility to choose the type of source, open, close, high, low, hl2 hlc3, ohlc4.
• Reaction: this configuration affects the color change before a change of direction, 1 being an immediate reaction and higher values, a more delayed reaction obtaining les false "changes of direction", a value of 3 filters the direction quite well.





- Trend Configuration

• Uptrend Condition P / VRI: possibility to select any of these conditions:

o Bullish MA direction
o Quick bullish MA direction
o Slow and fast bullish MA direction
o Price higher than slow MA
o Price higher than fast MA
o Price higher than slow and fast MA
o Price higher than slow MA and bullish direction
o Price higher than fast MA and bullish direction
o Price higher than slow, fast MA and bullish direction
o No condition

• Condition P / VVI bear trend: possibility of selecting any of these conditions:

o Slow bearish MA direction
o Fast bearish MA direction
o Slow and fast bearish MA direction
o Price less than slow MA
o Price less than fast MA
o Price less than slow and fast MA
o Price lower than slow MA and bearish direction
o Price less than fast MA and bearish direction
o Price less than slow, fast MA and bearish direction
o No condition

- Control bar configuration

• Minimum body percentage%: possibility to select what body percentage the bar must have.
• Paint control bar: when selected, paint the control bar.
• See control bar label: when selected, a label with the legend BC is plotted.



- Configuration bar ignored

• Above X% of the control bar: possibility to select above what percentage of the control bar the ignored bar must be located.
• Paint ignored bar: when selected, paint the ignored bar.

- Signal bar configuration

• You cannot override the minimum of the ignored bar: when selected, the condition is added that the signal bar cannot override the minimum of the ignored bar.
• Paint signal bar: when selected, paint the signal bar.
• See arrow: when selected it shows the direction arrow of the possible movement.
• See bear and arrow: when selected it shows bear and arrow label
• See bull and arrow: when selected it shows bull and arrow label

The following image shows the ignored bar and painted signal:



- Take profit / loss

The profit / loss taking varies depending on the trader and its risk / monetary plan, the proposal is a recommendation based on the nature of the event that is to have a small risk unit (stop below the minimum of the ignored bar), look for objectives in ratios greater than 2: 1 and eliminate the risk in 1: 1 by taking the stop to BE, all parameters are configurable and are the following:

• See recommended stop loss and take profit: trace the levels of Stop, BE, TP1 and TP2, as well as their prices to know them quickly based on the assumed risk
• To: select which event you want to draw the SL and TP (VRI, VVI)
• Extend stop loss line x bars: allows extending the stop line by x number of bars
• Extend take profit line x bars: allows extending the stop line by x number of bars
• Ratio to move to break even: allows you to select the minimum ratio to move stop to break even (default 1: 1)
• Take profit 1 ratio: allows you to select the ratio for take profit 1 (default 2: 1)
• Take profit 2 ratio: allows you to select the ratio for take profit 2 (default 4: 1)








- Alerts

• It is possible to configure the following alerts:

-VRI DETECTED
-VVI DETECTED
-VRI / VVI DETECTED

Final Notes:

- The term hard rules refers to the fact that an event is sought with the rules detailed above to obtain a high quality event but this brings 2 situations to consider, less
number of events and events that are generated in a strong impulse may be leaked, a very large control bar followed by an ignored narrow body away from moving averages, despite having a good chance of continuing, taking a stop very tight in a strong impulse you can touch it by the simple fact of the own volatility at that time.
- The setting of the parameters “Minimum body percentage% (control bar)”, “Above x% of the control bar (bar ignored)” and “Cannot override the minimum of the ignored bar” can bring large Benefits in terms of number of events and that can also be of high quality, feel free to find the best configuration for your instrument to operate.
- It is recommended to look for trending events, near moving averages and at an early stage of it.
- The display of several nearby VRIs or VVIs in an advanced trend may indicate a depletion of it.
- The alerts can be worked in 2 ways: at the closing of the candle (confirms event but the risk unit may be larger or smaller) or immediately the body of the ignored bar is exceeded, in case you are operating from the mobile and miss many events because of the short time I recommend that you operate in a superior time frame to have more time.
- The indicator is configured with “flexible” rules to have more events, but without any important criteria, each trader has to look for the best configuration that suits his instrument.
- It is recommended to partially close the operation based on the ratio and always keep a part of the position to apply manual trailing stop and try to maximize profits.

The code is open feel free to use and modify it, a mention in credits is appreciated.

If you liked this SCRIPT THUMB UP!

Greetings to all, I wish you much green!

Release Notes

minor change
Comments
goliathracer
Oliver claims his best algo is right 38% of the time and already profitable, but his more elobarate system score 87%.
Is it really that hard to code the other aspect so of it to have the algo check real-time for signals on various time frames?
If I have access to a coder (I can't code to save my life), I'd also automatically backtest those signals to themselves, same asset and timeframe. To come to a signal quality score.

Thanks for any replies,

J
pratekk
Why I am Only getting Long/Bullish Signals, not Getting Bearish/Short signals ?
On Short side i am not getting S.L and target Lines. Pls help
zakazai
Could you please explain the word Hidden RBI/GBI
Thewildant
Hi sir, superb algorithm. Quick question, also for the community. When I converted to strategy, it is placing the entries at signal bar closing (not just after the body of the ignored bar is exceeded).
My long entry condition is RES_VRI=true. I´m bit of a newbie in TV coding. Can you help me?.
Hola compañero, cuando convierto a estrategia me está lanzando las entradas al cierre de la barra de señal. Cómo lo debo hacer para que me entre en el momento adecuado (cuando ´supero´la barra ignorada?)

Mil gracias!!
rockingmotog
@Thewildant, Have you got the answer for the entry. ? Is it after the signal bar close ? or when the signal just crosses the ignored bar ?
getnow
hello sir please sent me this script in english i will request you
or
suggest me same as indicator all things are like this
loveloai
@getnow,

//@version=4
//
// Author= Alejandro Iovane / Dreadblitz
// Date= 07/12/2019
//
//
// Thanks for:
// Event/Strategy: Oliver Velez, iFT Academy, Martin Gigena (for his teaching)
// Pinescripters: Daveatt,JustUncleL,exit490,capissimo,alexgrover,everget,LazyBear (for sharing open source scripts)
//
// THE FOLLOWING SCRIPT DETECTS A PRICE ACTION EVENT INDICATING A POSSIBLE CONTINUATION OF THE TREND AND GIVES THE
// OPPORTUNITY TO GET ON THE SAME WITH A VERY ADJUSTED RISK, THE EVENT IS CALLED "GREEN AND RED CANDLES IGNORED" AND IT WAS
// CREATED BY OLIVER VELEZ, BY DEFAULT THE RULES ARE EXECUTED A LITTLE "FLEXIBLE" FOR THE DETECTION OF THE SAME AND HAVE MORE
// AMOUNT OF EVENTS, IT IS ALLOWED TO CONFIGURE THE RULES TO OBTAIN OTHER RESULTS TO BE EVALUATED BY THE TRADER,
// THE "HARD" RULES ARE AS FOLLOWS (YOU CAN TRY THEM BUT GIVE THE LOWEST AMOUNT OF ENTRIES, BUT THEY ARE HIGH QUALITY EVENTS):
//------------------------------------------------------------------------------------------------------------------------
// 1- LAST THREE BARS GREEN,RED,GREEN (VRI= RED CANDLE IGNORED) / RED,GREEN,RED (VVI= GREEN CANDLE IGNORED)
// 2- BE IN TREND (DETERMINED BY SIMPLE AVERAGES OF 8 AND 20 PERIODS)
// 3- CONTROL BAR WITH A BODY OF AT LEAST 55%
// 4- BAR IGNORED ABOVE UPPER 70% OF CONTROL BAR
// 5- SIGNAL BAR CANNOT OVERRIDE THE LOW OF THE IGNORED BAR
// ------------------------------------------------------------------------------------------------------------------------
// NOTES:- THIS SCRIPT ONLY DETECTS THE EVENT ACCORDING TO THE CONFIGURED RULES, IT IS THE RESPONSIBILITY OF THE TRADER TO EVALUATE
// THE GENERAL CONTEXT, DEPTH, EXPANSION, ETC. OF THE MARKET, THEN EXECUTE THE ENTRY AND MANAGE THE OPERATION
// ACCORDING TO YOUR TRADING PLAN.
// - IT IS RECOMMENDED TO USE A STOP A LITTLE BELOW THE IGNORED BAR, THIS GENERATES AN ADJUSTED RISK AND ALLOWS TO GO
// SEARCHING FOR A RATIO ABOVE 1 QUICKLY.
// - IT IS RECOMMENDED TO MOVE STOP TO BE ONCE YOU HAVE ACHIEVED 1:1, FIRST TAKE PROFIT IN 2:1 AND THEN EXECUTE TRAILING
// HAND STOP
// - IT IS RECOMMENDED TO LOOK FOR VRI/VVI IN TREND AND CLOSE TO THE MOVING AVERAGES
// - IT IS RECOMMENDED TO LOOK FOR IRV/VVI IN THE EARLY STAGE OF THE TREND
// - THE VISUALIZATION OF SEVERAL NEARBY VRI/VVI IN AN ADVANCED TREND COULD BE INDICATING AN EXHAUSTION OF THE SAME
// - IT IS RECOMMENDED TO DEEPEN THESE TECHNIQUES IN iFT ACADEMY- // ifundtraders.com/
//
study(shorttitle="VVI_VRI", title="RED AND GREEN CANDLES IGNORED BY OLIVER VELEZ", overlay=true)
//
//
// ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ //
// DATA ENTRY / CONFIGURATION
// ------------------------------------------------------------------------------------------------------------------
WAY= input(title = "═════════════════ WAY OF OPERATION ══════════════", defval = true, type = input.bool)
mode_type= input(defval="COMPLETE FILTERING", title="🔹 TYPE
nashlow
Hi,
Impressive coding and indicator seems to have good potential. But to realize this potential, any chance you could make 'English' version? Sorry can't read Spanish, I believe it is.
HTVH
Man. This is one of the greatest scripts on tradingview so far. Keep it up dude.
Dreadblitz
@WinterX, thank you very much, I hope you find it useful
More