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.
Sürüm Notları
⋅
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
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)
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.
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)