TradingView
SushilKothawade
6 Nov 2020 pukul 09.05

Catch the Big Fish 

INDUSIND BANK LTDNSE

Huraian

Volume based script to catch a big move. Works best on 5 min timeframe.
The default sma duration for volume is set to 150 = number of candles in 5 mins timeframe for 2 days.
Heavy volume is defined as = more than 9 times of sma.
Both parameters are configurable.
Trading strategy: Long buy at high / Short sell at low of the candle where the script gives the signal.
Important note regarding SL - for Long / Short positions respectively, the SL should be placed at low / high of previous candle, and NOT of the same candle.

Nota Keluaran

Volume based script to catch a big move. Works best on 5 min timeframe.
The default sma duration for volume is set to 150 = number of candles in 5 mins timeframe for 2 days.
Heavy volume is defined as = more than 9 times of sma.
Both parameters are configurable.

Trading strategy: Long buy at high / Short sell at low of the candle where the script gives the signal.
Important note regarding SL - for Long / Short positions respectively, the SL should be placed at low / high of previous candle, and NOT of the same candle.

Update from 24-Jan-2021,
The script now also plots high and low of heavy volume candle which acts as support and / or resistance.
high / low values are plotted for next 7 calendar days (max 5 working days, without holidays) which can be changed to your wish.

Conventions:
navy color indicates support, maroon indicates resistance
thicker indicates stronger support / resistance than the thinner
Komen
xuda09
I have added strategy coding and it now works, however, the prediction accuracy is not desireble. Let me know if you see differently. Thanks.

longCondition = longBrkOut
if (longCondition and year==2020)
strategy.entry("Strategy Long", strategy.long,qty=100)
shortCondition = shortBrkOut
if (shortCondition and year==2020)
strategy.entry("Strategy Short", strategy.short, qty=100)
Plutusmonies
// © SushilKothawade

//@version=4
strategy("Catch the Big Fish", overlay=true)
useStrat = input(true, "Use Strategy Setup")
yr = input(2019, "Starting backtest year", minval=2000)
mn = input(8, "Starting backtest month", minval=1, maxval=12)
dy = input(1, "Starting backtest day", minval=1, maxval=31)

multiplier = input(9, title="Volume multiplier")
duration = input(150, title="Volume SMA duration")
heavyVolume = volume > (sma(volume, duration) * multiplier)

calcLongBrkOut()=>

x = 0.0

if (heavyVolume and close < open)
x := high
else if (x[1] > 0)
x := x[1]

x

calcShortBrkOut()=>

x = 0.0

if (heavyVolume and close > open)
x := low
else if (x[1] > 0)
x := x[1]

x

longBrkOutVal = calcLongBrkOut()
shortBrkOutVal = calcShortBrkOut()

buyLbl = "Go long"
// sellLbl = "Sell the long"
slLong = "SL - Low of prev candle"

shortLbl = "Go short"
// coverLbl = "Cover the short"
slShort = "SL = High of prev candle"

longBrkOut = longBrkOutVal > 0 and close[1] >= longBrkOutVal and low[1] <= longBrkOutVal and close >= close[1] and close[1] >= open[1] and close >= open[1]
shortBrkOut = shortBrkOutVal > 0 and close[1] <= shortBrkOutVal and high[1] >= shortBrkOutVal and close <= close[1] and close[1] <= open[1] and close <= open[1]

plotshape( longBrkOut ? 1 : na, style = shape.labeldown , color = color.teal , location = location.abovebar, size = size.small, text = buyLbl, textcolor=color.white)
plotshape( longBrkOut ? 1 : na , style = shape.labelup , color = color.orange , location = location.belowbar , size = size.tiny, text = slLong, textcolor=color.white)
// plotshape( shortBrkOutVal != shortBrkOutVal[1] and shortBrkOutVal > 0 ? 1 : na , style = shape.labeldown , color = color.blue , location = location.abovebar , size = size.small, text = sellLbl, textcolor=color.white)

plotshape( shortBrkOut ? 1 : na, style = shape.labelup , color = color.red , location = location.belowbar, size = size.small, text = shortLbl, textcolor=color.white)
plotshape( shortBrkOut ? 1 : na , style = shape.labeldown , color = color.maroon , location = location.abovebar , size = size.tiny, text = slShort, textcolor=color.white)
// plotshape( longBrkOutVal != longBrkOutVal[1] and longBrkOutVal > 0 ? 1 : na , style = shape.labelup , color = color.purple , location = location.belowbar , size = size.small, text = coverLbl, textcolor=color.white)

//*** Strategy
if useStrat and year >= yr and month >= mn and dayofmonth >= dy
strategy.entry("BUY", true, 1, when=longBrkOut)
strategy.entry("SELL", false, 1, when=shortBrkOut)
ukmpits
@SushilKothawade Sir, Is there any future update? Thanks mate
jxmodi
waiting for your new script "Following the Pullback"
cc247
Looks like a nice indicator but couldn't get to work. Tried it with different volume indicators with no luck. 🙁
SushilKothawade
@cc247, change the parameter values and check.
Default value 9 for Volume Multiplier may be too much for some. Using value 4 or 5 may help for such instruments.
shahrachit
Hi Sushil Ji, It would be good if you can make strategy tester too :)
shahrachit
@SushilKothawade : Can you please also explain the logic how did you create it / logic behind trade.
SushilKothawade
@shahrachit, heavy volume generally indicates institutional / promoter buying / selling.. which basically means, something is about to happen in the stock, which retailers are not aware.
price movement below a bullish candle / above a bearish candle mostly ensures a trend reversal.
But, nothing is perfect on charts, so stop loss is more important.
Lebih