Backtesting Bollinger Bands Midline Crossover Strategy


Category:
0
0

Thinkorswim has a study on Bollinger upper and lower band crossovers for short and long entries, but not for the Midline. I have been trying to code a strategy on the 4hr chart. Each time a 4 hr bearish candle crosses and closes below the Bollinger Band Midline, place a sell order and each time a 4 hr bullish candle crosses and closes above the Midline, place a buy order. I have been doing a couple of scripts but did not get it to work properly. Can you provide a sample code?

Marked as spam
Posted by (Questions: 6, Answers: 1)
Asked on January 8, 2020 4:49 am
390 views
0
Private answer

Just use the built-in moving average strategy. It's named "MovAvgStrat". The mid line of the BollingerBands study is nothing more than a 20 period simple moving average.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on January 9, 2020 11:56 am