SushilKothawade

Catch the Big Fish

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.
Catatan Rilis: 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
Skrip open-source

Sejalan dengan semangat TradingView, penulis skrip ini telah mempublikasikannya secara open-source, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk sang penulis! Anda dapat menggunakannya secara gratis, tetapi penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk dapat menggunakannya didalam sebuah chart.

Inggin menggunakan skrip ini pada chart?

Komentar

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)
+4 Jawab
// © 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 > 0)
x := x

x

calcShortBrkOut()=>

x = 0.0

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

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 >= longBrkOutVal and low <= longBrkOutVal and close >= close and close >= open and close >= open
shortBrkOut = shortBrkOutVal > 0 and close <= shortBrkOutVal and high >= shortBrkOutVal and close <= close and close <= open and close <= open

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 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 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)
Jawab
waiting for your new script "Following the Pullback"
Jawab
Looks like a nice indicator but couldn't get to work. Tried it with different volume indicators with no luck. 🙁
Jawab
@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.
Jawab
Hi Sushil Ji, It would be good if you can make strategy tester too :)
Jawab
shahrachit shahrachit
@SushilKothawade : Can you please also explain the logic how did you create it / logic behind trade.
Jawab
@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.
+1 Jawab
Why I m not seeing anything here or it works only in live market. plz reply. thank you
Jawab