Re: MT4 Indicator requests and ideas

8171
kingzboleto wrote: Wed Jan 29, 2020 1:14 pm

and that how its in tradingview im talking about bands dear

study("VWAP Stdev Bands v2", overlay=true)
devUp1 = input(2, title="Stdev above (1)")
devDn1 = input(2, title="Stdev below (1)")

devUp2 = input(1.28, title="Stdev above (2)")
devDn2 = input(1.28, title="Stdev below (2)")

devUp3 = input(3.09, title="Stdev above (3)")
devDn3 = input(3.09, title="Stdev below (3)")

showDv2 = input(false, type=bool, title="Show second group of bands?")
showDv3 = input(false, type=bool, title="Show third group of bands?")

showPrevVWAP = input(false, type=bool, title="Show previous VWAP close")

start = security(tickerid, "D", time)

newSession = iff(change(start), 1, 0)

vwapsum = iff(newSession, hl2*volume, vwapsum[1]+hl2*volume)
volumesum = iff(newSession, volume, volumesum[1]+volume)
v2sum = iff(newSession, volume*hl2*hl2, v2sum[1]+volume*hl2*hl2)
myvwap = vwapsum/volumesum
dev = sqrt(max(v2sum/volumesum - myvwap*myvwap, 0))

plot(myvwap, title="VWAP", color=green)
plot(myvwap + devUp1 * dev, title="VWAP Upper", color=red)
plot(myvwap - devDn1 * dev, title="VWAP Lower", color=red)

plot(showDv2 ? myvwap + devUp2 * dev : na, title="VWAP Upper (2)")
plot(showDv2 ? myvwap - devDn2 * dev : na, title="VWAP Lower (2)")

plot(showDv3 ? myvwap + devUp3 * dev : na, title="VWAP Upper (3)", color=teal)
plot(showDv3 ? myvwap - devDn3 * dev : na, title="VWAP Lower (3)", color=teal)

prevwap = iff(newSession, myvwap[1], prevwap[1])
plot(showPrevVWAP ? prevwap : na, style=circles, color=close > prevwap ? green : red)


The Vwap bands here are not made with ma or ema they are made using the VWAP indicator using standard deviation, the only difference is they are not intraday, guess you would call it.


Re: MT4 Indicator requests and ideas

8172
[quote=mrtools]
[quote=kingzboleto post_id=1295401978 time=1580264090 user_id=4936781]
[quote=kingzboleto post_id=1295401977 time=1580258936 user_id=4936781]
hi everyone hope all of u fine and having nice and green days with trading
mr tools and all the staff cold someone make VWAP indicator with bands
i know the reply its gone be there is vwap bands but sorry that its just BBands
vwap bands dont change when you change the time frame its still in the same place and levels vwap its nots MA OR EMA
its here in the pics the true VWAP and how it work so cold you please mrtools make something like that for use in mt4 with bands
[/quote]

and that how its in tradingview im talking about bands dear

study("VWAP Stdev Bands v2", overlay=true)
devUp1 = input(2, title="Stdev above (1)")
devDn1 = input(2, title="Stdev below (1)")

devUp2 = input(1.28, title="Stdev above (2)")
devDn2 = input(1.28, title="Stdev below (2)")

devUp3 = input(3.09, title="Stdev above (3)")
devDn3 = input(3.09, title="Stdev below (3)")

showDv2 = input(false, type=bool, title="Show second group of bands?")
showDv3 = input(false, type=bool, title="Show third group of bands?")

showPrevVWAP = input(false, type=bool, title="Show previous VWAP close")

start = security(tickerid, "D", time)

newSession = iff(change(start), 1, 0)

vwapsum = iff(newSession, hl2*volume, vwapsum[1]+hl2*volume)
volumesum = iff(newSession, volume, volumesum[1]+volume)
v2sum = iff(newSession, volume*hl2*hl2, v2sum[1]+volume*hl2*hl2)
myvwap = vwapsum/volumesum
dev = sqrt(max(v2sum/volumesum - myvwap*myvwap, 0))

plot(myvwap, title="VWAP", color=green)
plot(myvwap + devUp1 * dev, title="VWAP Upper", color=red)
plot(myvwap - devDn1 * dev, title="VWAP Lower", color=red)

plot(showDv2 ? myvwap + devUp2 * dev : na, title="VWAP Upper (2)")
plot(showDv2 ? myvwap - devDn2 * dev : na, title="VWAP Lower (2)")

plot(showDv3 ? myvwap + devUp3 * dev : na, title="VWAP Upper (3)", color=teal)
plot(showDv3 ? myvwap - devDn3 * dev : na, title="VWAP Lower (3)", color=teal)

prevwap = iff(newSession, myvwap[1], prevwap[1])
plot(showPrevVWAP ? prevwap : na, style=circles, color=close > prevwap ? green : red)
[/quote]



The Vwap bands here are not made with ma or ema they are made using the VWAP indicator using standard deviation, the only difference is they are not intraday, guess you would call it.
[/quote][quote=mrtools post_id=1295402013 time=1580317895 user_id=4864807]
[quote=kingzboleto post_id=1295401978 time=1580264090 user_id=4936781]


and that how its in tradingview im talking about bands dear

study("VWAP Stdev Bands v2", overlay=true)
devUp1 = input(2, title="Stdev above (1)")
devDn1 = input(2, title="Stdev below (1)")

devUp2 = input(1.28, title="Stdev above (2)")
devDn2 = input(1.28, title="Stdev below (2)")

devUp3 = input(3.09, title="Stdev above (3)")
devDn3 = input(3.09, title="Stdev below (3)")

showDv2 = input(false, type=bool, title="Show second group of bands?")
showDv3 = input(false, type=bool, title="Show third group of bands?")

showPrevVWAP = input(false, type=bool, title="Show previous VWAP close")

start = security(tickerid, "D", time)

newSession = iff(change(start), 1, 0)

vwapsum = iff(newSession, hl2*volume, vwapsum[1]+hl2*volume)
volumesum = iff(newSession, volume, volumesum[1]+volume)
v2sum = iff(newSession, volume*hl2*hl2, v2sum[1]+volume*hl2*hl2)
myvwap = vwapsum/volumesum
dev = sqrt(max(v2sum/volumesum - myvwap*myvwap, 0))

plot(myvwap, title="VWAP", color=green)
plot(myvwap + devUp1 * dev, title="VWAP Upper", color=red)
plot(myvwap - devDn1 * dev, title="VWAP Lower", color=red)

plot(showDv2 ? myvwap + devUp2 * dev : na, title="VWAP Upper (2)")
plot(showDv2 ? myvwap - devDn2 * dev : na, title="VWAP Lower (2)")

plot(showDv3 ? myvwap + devUp3 * dev : na, title="VWAP Upper (3)", color=teal)
plot(showDv3 ? myvwap - devDn3 * dev : na, title="VWAP Lower (3)", color=teal)

prevwap = iff(newSession, myvwap[1], prevwap[1])
plot(showPrevVWAP ? prevwap : na, style=circles, color=close > prevwap ? green : red)
[/quote]



The Vwap bands here are not made with ma or ema they are made using the VWAP indicator using standard deviation, the only difference is they are not intraday, guess you would call it.
[/quote]

sorry for bother you mrtools
but can you plz and band to that vwap


//+------------------------------------------------------------------+
//| VWAP.mq4 |
//| trading genius |
//| thomasbill1964@gmail.com |
//| Like my stuff? Made some profits using it? |
//| |
//+------------------------------------------------------------------+
#property copyright "tradinggenius"
#property link "thomasbill1964@gmail.com"
#property version "1.00"
#property strict
#property indicator_buffers 1
#property indicator_chart_window
#property indicator_color1 Red
//+------------------------------------------------------------------+
//| Variables |
//+------------------------------------------------------------------+
double ExtBufferVWAP[];
double __ohlcvTotal,
__volumeTotal;
datetime __sessionStartTime;

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---

__volumeTotal = 0;
__ohlcvTotal = 0;
__sessionStartTime = 0;

IndicatorShortName( "VWAP" );
IndicatorDigits( _Digits );

//--- Drawing settings
SetIndexStyle( 0, DRAW_LINE );

//--- Indicator buffers mapping
SetIndexBuffer( 0, ExtBufferVWAP );

//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
//---

// An "Intraday" indicator makes no sense anymore above H1
if ( Period() >= PERIOD_H4 )
{
return ( rates_total - 1 );
}

int startIndex = MathMax( 0, rates_total - prev_calculated - 1 );

// Only calculate up until the previous bar. We don't want to calculate the current bar.
if ( startIndex > 0 )
{
for ( int i = startIndex; i >= 1; i-- )
{
double
ohlcAvg = ( open[ i ] + high[ i ] + low[ i ] + close[ i ] ) / 4,
vol = ( double ) tick_volume[ i ];

// Reset values when session changed
if ( TimeDay( time[ i ] ) != TimeDay ( __sessionStartTime ) )
{
__sessionStartTime = time[ i ];
__ohlcvTotal = 0;
__volumeTotal = 0;
}

__ohlcvTotal += ohlcAvg * vol;
__volumeTotal += vol;

ExtBufferVWAP[ i ] = NormalizeDouble( __ohlcvTotal / __volumeTotal, _Digits );
}
}

return( rates_total - 1 );
}
//+------------------------------------------------------------------+

Re: MT4 Indicator requests and ideas

8173
kingzboleto wrote: Thu Jan 30, 2020 8:48 am

sorry for bother you mrtools
but can you plz and band to that vwap


//+------------------------------------------------------------------+
//| VWAP.mq4 |
//| trading genius |
//| thomasbill1964@gmail.com |
//| Like my stuff? Made some profits using it? |
//| |
//+------------------------------------------------------------------+
#property copyright "tradinggenius"
#property link "thomasbill1964@gmail.com"
#property version "1.00"
#property strict
#property indicator_buffers 1
#property indicator_chart_window
#property indicator_color1 Red
//+------------------------------------------------------------------+
//| Variables |
//+------------------------------------------------------------------+
double ExtBufferVWAP[];
double __ohlcvTotal,
__volumeTotal;
datetime __sessionStartTime;

//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---

__volumeTotal = 0;
__ohlcvTotal = 0;
__sessionStartTime = 0;

IndicatorShortName( "VWAP" );
IndicatorDigits( _Digits );

//--- Drawing settings
SetIndexStyle( 0, DRAW_LINE );

//--- Indicator buffers mapping
SetIndexBuffer( 0, ExtBufferVWAP );

//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
//---

// An "Intraday" indicator makes no sense anymore above H1
if ( Period() >= PERIOD_H4 )
{
return ( rates_total - 1 );
}

int startIndex = MathMax( 0, rates_total - prev_calculated - 1 );

// Only calculate up until the previous bar. We don't want to calculate the current bar.
if ( startIndex > 0 )
{
for ( int i = startIndex; i >= 1; i-- )
{
double
ohlcAvg = ( open[ i ] + high[ i ] + low[ i ] + close[ i ] ) / 4,
vol = ( double ) tick_volume[ i ];

// Reset values when session changed
if ( TimeDay( time[ i ] ) != TimeDay ( __sessionStartTime ) )
{
__sessionStartTime = time[ i ];
__ohlcvTotal = 0;
__volumeTotal = 0;
}

__ohlcvTotal += ohlcAvg * vol;
__volumeTotal += vol;

ExtBufferVWAP[ i ] = NormalizeDouble( __ohlcvTotal / __volumeTotal, _Digits );
}
}

return( rates_total - 1 );
}
//+------------------------------------------------------------------+
Try here viewtopic.php?p=1295398195#p1295398195


LikeRe: MT4 Indicator requests and ideas

8178
mrtools wrote: Thu Jan 30, 2020 2:12 pm

Added the bands to the code you posted you can remove the first,second,or third band by putting deviation at zero.
thank you mrtools i have try it and it dose the same job like bollinger bands and when you change time frame it change with it but the vwap i use in stocks broker its deference and even in tradingview.... com its deferent
its ok bro dont bother your self indicator its just a tool i will find an other way to trade fx market
cheer :thumbup: :thumbup: <3


Who is online

Users browsing this forum: alimpe2000, Google [Bot] and 75 guests