Select Page

Mean Reversion RSI + Bollinger Bands Pinescript Strategy is the strategy which only triggers when both the RSI and the Bollinger Band give confirmation for overbought or oversold condition.

Strategy Rules

Long Entry: When price is below the lower Bollinger Band and RSI is Over Sold
Long Exit: Either when SL or Target is hit. If SL/TGT is not hit, it exits on SE condition
Short Entry: When price is above the upper Bollinger Band and RSI is Over Bought
Short Exit: Either when SL or Target is hit. If SL/TGT is not hit, it exits on LE condition

Mean Reversion RSI + Bands Pinescript Strategy Parameters

  1. RSI Length(Mandatory): This is the number of bars used to calculate RSI
  2. Bollinger Band Length: This is the number of bars used to calculate Bollinger Band
  3. Intraday Trade Session : Entry Trade Will be Taken only during this time
  4. EXIT Session : Trades will be squared off in this time
  5. Quantity: This is used to specify the trade quantity
  6. Custom Stop Loss in Points: Movement in chart price against the momentum which will trigger exit
  7. Custom Target in Points: Movement in chart price against the momentum which will trigger exit

TradingView Settings

Download the strategy file here

Open desired chart in trading view with normal candlestick ,select desired timeframe of the chart. Next, follow these steps: (1) Go to pine editor section, remove the default code, (2) paste the downloaded code, (3) save the file and (4) add to chart. See screenshot below.

Before setting up alert make sure that you have setup correctg chart, timeframe, strategy settings; and, apibridge is configured and running. Click in settings add alert and paste {{strategy.order.comment}} in message box.

That’s all, you are ready to trade.