Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

// @version=2 // // @author VivoDasCryptos // study("Weis Wave Vol Study

[VivoDasCryptos]", shorttitle="WWV_VdC", overlay=true, precision=0,


scale=scale.none) // Start on Weis Wave Vol calculation (Do not touch!)
trendDetectionLength=input(1) showDistributionBelowZero=input(title="Show
Distribution Below Zero?", type=bool, defval=false) mov = close>close[1] ? 1 :
close<close[1] ? -1 : 0 trend= (mov != 0) and (mov != mov[1]) ? mov : nz(trend[1])
isTrending = rising(close, trendDetectionLength) or falling(close,
trendDetectionLength) //abs(close-close[1]) >= dif wave=(trend != nz(wave[1])) and
isTrending ? trend : nz(wave[1]) vol=wave==wave[1] ? (nz(vol[1])+volume) : volume
buy=wave == 1 ? vol : 0 sell=showDistributionBelowZero ? (wave == 1 ? 0 : wave ==
-1 ? -vol : vol) : (wave == 1 ? 0 : vol) // Start on Weis Wave Vol calculation (Do
not touch!) // Plot histogram plot(buy, style=histogram, color=green, linewidth=2,
title="-- Turn Green --") plot(sell, style=histogram, color=red, linewidth=2,
title="-- Turn Red --") // Plot Buy / Sell signals plotshape(cross(buy, sell) ? buy
: na and open >= close[1], color=#00ffff, style=shape.arrowup, text="BUY",
location=location.bottom) plotshape(cross(sell, buy) and not cross(sell,close[1]) ?
sell : na and open >= close[1], color=yellow, style=shape.arrowdown, text="SELL",
location=location.top) // Create Alert Condition buyCond=cross(buy, sell) ? buy :
na and open >= close[1] and buyCond[1] != true sellCond=cross(sell, buy) and not
cross(sell,close[1]) ? sell : na and open >= close[1] and sellCond[1] != true
alertcondition(buyCond, title="BUY (Long) !!!") alertcondition(sellCond,
title="SELL (Short) !!!") // alertcondition(cross(buy, sell) ? buy : na and open >=
close[1], title="BUY (Long) !!!") // alertcondition(cross(sell, buy) ? sell : na
and open >= close[1], title="SELL (Short) !!!")

You might also like