vZone (Volumes Based Support/Resistance)

Thomas

Active member
VIP
Beautiful!

Nice work @SuryaKiranC - such a clean indicator!

Very powerful indicator! MSFT Levels today. From breakout to resistance.

HdQY7Ff.jpg
Nice, any particular reason for these specific MA's
 

SuryaKiranC

Well-known member
Nice, any particular reason for these specific MA's
No reason what so ever, Only trying to identify reversals, Which is not part of original Indicator to make this information tradable, Can be replaced by any other reversal identification method.
 

Thomas

Active member
VIP
No reason what so ever, Only trying to identify reversals, Which is not part of original Indicator to make this information tradable, Can be replaced by any other reversal identification method.
OK, just curious...seemed it was built on the Fibs so I will play, trying this on 15 minute for extra boost from price.
 

SuryaKiranC

Well-known member
OK, just curious...seemed it was built on the Fibs so I will play, trying this on 15 minute for extra boost from price.
5m is what was explained in the original video, I was originally planning on implementing this to work, the vZone part not EMA cloud, only on 5m, then decided to keep it up to 15m to see where the edge is. I would use this only on 5/10/15m though it would work on smaller than 5m frames. not enough time to pull off a trade, atleast for me.
 

Thomas

Active member
VIP
5m is what was explained in the original video, I was originally planning on implementing this to work, the vZone part not EMA cloud, only on 5m, then decided to keep it up to 15m to see where the edge is. I would use this only on 5/10/15m though it would work on smaller than 5m frames. not enough time to pull off a trade, atleast for me.
I agree, you can try this on 15,... I need to see how it reacts and if I can understand extraction for profit, otherwise I will stay with price action..
 

Ahmar824

Member

SuryaKiranC

Well-known member
If I'm not mistaking it's still showing the zones only on 15 minutes chart or lower time frame because at least that's what the code says, is there any way we can take that out because I was looking at the hourly chart it's not showing any of the zones thank you
I don't see any time restrictions on the code, @cos251 posted. It's just the description and comment area of the code that need fixing.
 

RegularRob

New member
VIP
I received this alert "Below High VolumeBar Look for Reversal". Can you please explain your thinking on this? Just trying to understand if my thoughts align with yours. High volume looking to take profits? Thanks.
 

SuryaKiranC

Well-known member
I received this alert "Below High VolumeBar Look for Reversal". Can you please explain your thinking on this? Just trying to understand if my thoughts align with yours. High volume looking to take profits? Thanks.
Zone Low is the Support, when broke, we look for reversal into that Zone. Please go though the Video, Linked in the indicator Header, as well as in the First comment. Please go through multiple time and process the information, We are only announcing out that is is below that Zone, in itself is not a entry for trade. Original Indicator will not explain or use EMA clouds we use for reversals. but we to to make it easy on the eyes.
 

Whitecatlee

New member
Yet another Support/Resistance Indicator for DayTrading, but with a twist, We use high/low of High Volume Bar, in three different Zones of the Day.
With out further delay, Uploading the code here, will come back and edit this line with more appropriate description.

huge thanks to @cos251 for helping me with Coding this, Reviewing and Testing it.

Link to Video: https://www.screencast.com/users/Ma...10/media/f1702bb2-2090-463a-8ad2-59639c1166cd

vZone Extend On/Off

Ruby:
## vZoneSTUDY.ts
## This Indicator is based on the Following concept and, I suggest watch the video before you start to use this.
##
## https://www.screencast.com/users/MarketGauge/folders/DATE1010/media/f1702bb2-2090-463a-8ad2-59639c1166cd
## This is to Plot Support/Resistance based on High Volume Candle in three different time zones for the day.
##
## Removing the header Credit credits and description is not permitted, any modification needs to be shared.
## A big thanks to @COS251 for helping me with Coding this, Reviewing and Testing it.
##
## V 1.1 : Just added the ability to disable the vZones, automatically, extending from previous in to current session.
##  Note : It is available as an option, should somebody prefer the extension. Set "Extend" to your needs accordingly.
## V 1.0 : Split Day in to three Zones and Find the highest Volume Candle for each zone and plot Support/Resistance.
##        :     Zone 1 : 09:30 - 11:00
##        :     Zone 2 : 11:00 - 14:00
##        :     Zone 3 : 14:00 - 16:00
##        :     vZones are Plotted on 15m and lower charts.
##        :  Plots EMA Cloud to assist with identifying reversals, Keeping EMA Clouds for all Timeframes


declare upper;
declare once_per_bar;

def Future = if GetSymbolPart(1) == "/YM:XCBT" or GetSymbolPart(1) == "/ES:XCME" or GetSymbolPart(1) == "/NQ:XCME" or GetSymbolPart(1) == "/RTY:XCME" or GetSymbolPart(1) == "/EMD:XCME" or GetSymbolPart(1) == "/NKD:XCME" or GetSymbolPart(1) == “/DX:XICE" or GetSymbolPart(1) == "/6E:XCME" or  GetSymbolPart(1) == "/6A:XCME" or GetSymbolPart(1) == "/ZB:XCBT" or GetSymbolPart(1) == "/ZN:XCBT" or GetSymbolPart(1) == "/CL:XNYM" or GetSymbolPart(1) == "/NG:XNYM" or GetSymbolPart(1) == "/GC:XCEC" or GetSymbolPart(1) == "/SI:XCEC" or  GetSymbolPart(1) == "/HG:XCEC” or GetSymbolPart(1) == "/6B:XCME" or GetSymbolPart(1) == "/ZC:XCBT" or GetSymbolPart(1) == "/ZS:XCBT" or GetSymbolPart(1) == "/CC:XICE" or GetSymbolPart(1) == "/KC:XICE" or GetSymbolPart(1) == ”/CT:XICE" or GetSymbolPart(1) == "/ZW:XCBT" or GetSymbolPart(1) == "/SB:XICE" or GetSymbolPart(1) == "/LE:XCME" or GetSymbolPart(1) == "/HO:XNYM" or GetSymbolPart(1) == "/HE:XCME" or GetSymbolPart(1) == "/OJ:XICE" then yes else no;

AddLabel(if Future then yes else no, "Future", Color.YELLOW);

input   showEMACloud = Yes;
input  audibleAlerts = Yes;
input Extend = {default "No", "Yes"};

def Today = GetYYYYMMDD();
def StartTime = 0930;
def   Update1 = 1100;
def   Update2 = 1400;
def   EndTime = 1600;

def Zone1 = SecondsFromTime(StartTime) >= 0 and SecondsTillTime(Update1) >= 0;
def Zone2 =   SecondsFromTime(Update1) >= 0 and SecondsTillTime(Update2) >= 0;
def Zone3 =   SecondsFromTime(Update2) >= 0 and SecondsTillTime(EndTime) >= 0;

DefineGlobalColor("Zone1", CreateColor(204, 255, 225));
DefineGlobalColor("Zone2", CreateColor(252, 220, 101));
DefineGlobalColor("Zone3", CreateColor(204, 204, 198));
DefineGlobalColor( "EMA1+", CreateColor(201, 255, 234));
DefineGlobalColor( "EMA1-", CreateColor(255, 105, 105));
DefineGlobalColor( "EMA2+", CreateColor(125, 176, 130));
DefineGlobalColor( "EMA2-", CreateColor(194, 152, 227));
DefineGlobalColor( "EMA3+", CreateColor(161, 217, 247));
DefineGlobalColor( "EMA3-", CreateColor(255, 255, 112));

def  ema1low = 5;
def ema1high = 13;
def  ema2low = 34;
def ema2high = 51;
def  ema3low = 72;
def ema3high = 89;

def  ema5 = if showEMACloud then ExpAverage(close,  ema1low) else Double.NaN;
def ema13 = if showEMACloud then ExpAverage(close, ema1high) else Double.NaN;
def ema34 = if showEMACloud then ExpAverage(close,  ema2low) else Double.NaN;
def ema51 = if showEMACloud then ExpAverage(close, ema2high) else Double.NaN;
def ema72 = if showEMACloud then ExpAverage(close,  ema3low) else Double.NaN;
def ema89 = if showEMACloud then ExpAverage(close, ema3high) else Double.NaN;

AddCloud( ema5, ema13, GlobalColor("EMA1+"), GlobalColor("EMA1-"));
AddCloud(ema34, ema51, GlobalColor("EMA2+"), GlobalColor("EMA2-"));
AddCloud(ema72, ema89, GlobalColor("EMA3+"), GlobalColor("EMA3-"));

def CrossAbove = if showEMACloud and ema5 > ema13 and ema5[1] <= ema13[1] then 1 else 0;
def CrossBelow = if showEMACloud and ema5 < ema13 and ema5[1] >= ema13[1] then 1 else 0;

Alert(showEMACloud and audibleAlerts and CrossAbove, "Buy", Alert.BAR, Sound.Ding);
Alert(showEMACloud and audibleAlerts and CrossBelow, "Sell", Alert.BAR, Sound.Ring);

################################################################
##########         Booleans Set for Plot Use           #########
################################################################
def afterStart;
def beforeEnd;
def openPrice;
if GetAggregationPeriod() <= AggregationPeriod.FIFTEEN_MIN {
    afterStart = GetTime() > RegularTradingStart(GetYYYYMMDD());
    beforeEnd = GetTime() < RegularTradingEnd(GetYYYYMMDD());
    openPrice = DailyOpen();
} else {
    afterStart = Double.NaN;
    beforeEnd = Double.NaN;
    openPrice = Double.NaN;
}

plot DailyO = if openPrice then openPrice else Double.NaN;

script Zone {
    def H ;
    def L ;
    def V ;

    input CountIn = 0930;
    input CountOut = 1100;
    def TF = SecondsFromTime(CountIn) >= 0 and SecondsTillTime(CountOut) >= 0;

    if TF and !TF[1] {
        H = high;
        L = low;
        V = volume;
    } else if TF and volume > V[1] {
        H = high;
        L = low;
        V = volume;
    } else {
        H = H[1];
        L = L[1];
        V = V[1];
    }
    plot VZH = H;
    plot VZL = L;
    VZH.Hide();
    VZL.Hide();
}

def Z1H;
def Z1L;
def Z2H;
def Z2L;
def Z3H;
def Z3L;

switch (Extend){

Case "Yes":
 Z1H = Zone(CountIn = StartTime, CountOut = Update1).VZH;
 Z2H = Zone(CountIn =   Update1, CountOut = Update2).VZH;
 Z3H = Zone(CountIn =   Update2, CountOut = EndTime).VZH;

 Z1L = Zone(CountIn = StartTime, CountOut = Update1).VZL;
 Z2L = Zone(CountIn =   Update1, CountOut = Update2).VZL;
 Z3L = Zone(CountIn =   Update2, CountOut = EndTime).VZL;

Case "No":
 Z1H = if today != today[1] then Double.NaN else Zone(CountIn = StartTime, CountOut = Update1).VZH;
 Z2H = if today and  !Zone2 then Double.NaN else Zone(CountIn =   Update1, CountOut = Update2).VZH;
 Z3H = if today and  !Zone3 then Double.NaN else Zone(CountIn =   Update2, CountOut = EndTime).VZH;

 Z1L = if today != today[1] then Double.NaN else Zone(CountIn = StartTime, CountOut = Update1).VZL;
 Z2L = if today and  !Zone2 then Double.NaN else Zone(CountIn =   Update1, CountOut = Update2).VZL;
 Z3L = if today and  !Zone3 then Double.NaN else Zone(CountIn =   Update2, CountOut = EndTime).VZL;
}

def BelowVZ = if close < Z1L or close < Z2L or close < Z3L then 1 else 0;
def AboveVZ = if close > Z1H or close > Z2H or close > Z3H then 1 else 0;

AddLabel(if (GetAggregationPeriod() > AggregationPeriod.FIFTEEN_MIN) then yes else no, "vBox Zones on 5/10/15M Charts Only", Color.RED);

AddCloud(if afterStart and beforeEnd then Z1H else Double.NaN, if afterStart and beforeEnd then Z1L else Double.NaN, GlobalColor("Zone1"), GlobalColor("Zone1"));
AddCloud(if    Update1 and beforeEnd then Z2H else Double.NaN, if    Update1 and beforeEnd then Z2L else Double.NaN, GlobalColor("Zone2"), GlobalColor("Zone2"));
AddCloud(if    Update2 and beforeEnd then Z3H else Double.NaN, if    Update2 and beforeEnd then Z3L else Double.NaN, GlobalColor("Zone3"), GlobalColor("Zone3"));

Alert(audibleAlerts and AboveVZ, "Above High VolumeBar Caution Long", Alert.BAR, Sound.Ding);
Alert(audibleAlerts and BelowVZ, "Below High VolumeBar Look for Reversal", Alert.BAR, Sound.Ring);
thank you for taking your time to put me through this indicator. made my trading better today
 

nitrous

Member
VIP
@SuryaKiranC Is it possible to plot a line that shows the high and low of each of the highest volume bar for its zone?

i.e if Zone 1 has 2 different highest volume candlestick during this period, plot the high/low of those each candlesticks.
 

SuryaKiranC

Well-known member
@SuryaKiranC Is it possible to plot a line that shows the high and low of each of the highest volume bar for its zone?

i.e if Zone 1 has 2 different highest volume candlestick during this period, plot the high/low of those each candlesticks.
Those are the Box High and Low plots, You want lines instead of Box/Cloud? What you have to remember is, the box adjusts the placement and size when another High Volume Bar is found with in the same vZone. if we are plotting lines show we retain the 1st plot High/low till we find next high/Low for each zone?

-s
 

nitrous

Member
VIP
Those are the Box High and Low plots, You want lines instead of Box/Cloud? What you have to remember is, the box adjusts the placement and size when another High Volume Bar is found with in the same vZone. if we are plotting lines show we retain the 1st plot High/low till we find next high/Low for each zone?

-s
Yes, you are right that the box high and low are the actual plots.

I would still want to keep the high low clouds, but at the same time just plot a line as well to better visualize the high and low of each high volume candlestick. Maybe this can be set as an option , if someone would prefer to turn it on or off.

And yes, we should retain the previous plot lines for high low.

Thanks
 

SuryaKiranC

Well-known member
Yes, you are right that the box high and low are the actual plots.
Just change the def to plot, and you are done. Line 121 - 126.

Ruby:
plot Z1H;
plot Z1L;
plot Z2H;
plot Z2L;
plot Z3H;
plot Z3L;

Z1H.SetDefaultColor(GlobalColor("Zone1"));
Z2H.SetDefaultColor(GlobalColor("Zone2"));
Z3H.SetDefaultColor(GlobalColor("Zone3"));
Z1L.SetDefaultColor(GlobalColor("Zone1"));
Z2L.SetDefaultColor(GlobalColor("Zone2"));
Z3L.SetDefaultColor(GlobalColor("Zone3"));
 
Last edited:

SuryaKiranC

Well-known member
Thanks, how would one add color to these plots and maybe even display price ?
updated the piece of code in the above comment for colors, you can chose to use the Defined Global colors or Simply replace (GlobalColor("ZoneX")) with Color.<Pre existing color support by TOS>.

As for Price, you shouldn't have to do do anything, they should be shown in the color of plot on the price axis on the right of the screen.
 

Similar threads

Top