The strategy is based on vwap (volume weighted average price) and ATR (average true range).

The strategy takes a long trade when the asset is gapping up and subsequently price goes into a consolidation phase and finally if we get a rejection from the vwap to move to prior highs.

The stop loss is based on the 14 period ATR of the asset and it is trailed as per the ATR.

There are many custom inputs that can be given in the strategy such as:

Trade crypto markets: If checked then this strategy will work on any markets that trade 24×7 otherwise it will only trade in the stock trading hours

Trade only gapping stocks: If checked then the strategy will work only on stocks that have opened gapped up or down today.

ATR Period and X: We can select the period for ATR and its multiplier as well.

Some of the sample testing results on various markets:

HDFC BANK
Bitcoin
Banknifty index futures

The pine script code for the strategy is as follows:

You can copy paste the above code in your pine editor at tradingview.com

If you’re new to pine script and wondering where to start, then this article is a must-read for you: https://medium.com/@mysteryta47/pine-script-tutorial-8a140f6b7a25

If you liked what i post here regularly then kindly subscribe and visit me at https://twitter.com/rahul_12gh

https://medium.com/@mysteryta47

1 Comment

  1. Deshraj's avatar Deshraj says:

    पॉजिटिव thing

Leave a Reply