Bollinger Bands & RSI Strategy


Category:
0
0

Hi Pete, I watched one of your videos from YouTube (https://www.youtube.com/watch?v=YW8ruMckbEw) about how to set up a Bollinger Bands & RSI Strategy. I set it up the same way you did but for some reason I’m not getting the same results. Can you see where I went wrong?

Thanks for all your help, below is the code from the condition wizard with your code from the template you created.

input tradeSize = 100;

def signal = RSI().”RSI” crosses above 25 and low crosses below BollingerBands().”LowerBand” within 8 bars;
addOrder(OrderType.BUY_TO_OPEN, signal, open[-1], tradeSize, Color.CYAN, Color.CYAN);

def exit = RSI().”RSI” is less than RSI().”RSI” from 1 bars ago and high crosses above BollingerBands().”UpperBand” within 4 bars;

addOrder(OrderType.SELL_TO_CLOSE, exit, open[-1], tradeSize, Color.MAGENTA, Color.MAGENTA);

Attachments:
RESOLVED
Marked as spam
Posted by (Questions: 2, Answers: 2)
Asked on June 6, 2018 6:01 am
564 views
0
Private answer

Wow, there is so much going wrong here I will need to make a list.

  1. Very slight difference in the exit signal. Yours is checking for a cross of the high above the upper band while my original is only checking if high was greater than upper band.
  2. Your screenshot does not include the Bollinger Band plots. So how can we know if any of these signals are right or wrong?
  3. Your RSI on the chart has been changed to a 10 period instead of the default 14 period. Your code is using the default value. They need to be matched.
  4. You have a series of sell orders without any buy orders. And the position size for each order is 0. I don’t know how on earth you managed to do that. But It is certainly something you changed in the settings of the orders.
    1. How about that. I managed to figure out what you did. First you set the tradeSize input parameter to zero. Then you changed Order 2 from “To Close” to “Auto”. Then you changed the Global Strategy Settings to allow up 8-10 entry orders in the same direction. Whew!

Screenshot shows that I have figured it all out. Was this some sort of IQ test you dreamt up? Did I pass?

To summarize.

  1. Return everything to default settings
  2. Put the Bollinger Band study on your chart
  3. Replace the following line (#1) with the correct version (#2)
    1. def exit = RSI().”RSI” is less than RSI().”RSI” from 1 bars ago and high crosses above BollingerBands().”UpperBand” within 4 bars;
    2. def exit = RSI()."RSI" < RSI()."RSI"[1] and high > BollingerBands()."UpperBand" within 4 bars;

My recommendation. Don’t mess with the advanced stuff until you have viewed and assimilated the basic and intermediate stuff. Strategies are extremely complex. We cover the entire range and the video you watched was the uber-advanced version.

View these in the following order. Then come back to the AutoTrade video and things will make a lot more sense.

Thinkorswim Strategy Guide

Thinkorswim Strategy Analysis (article)

Thinkorswim Strategy Analysis (video)

Thinkorswim Scan to Strategy Conversion

 

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on June 6, 2018 8:21 am