I'm having trouble with a strategy that kicks off trades using a Bollinger line.
for example
OnBarUpdate=False
If [close] CrossAbove Bollinger [Lower] BarsAgo=0
Buy
If [close] CrossBelow Bollinger [Lower] BarsAgo =0
Sell
The problem occurs when there is an intrabar spike through the line, say price action cross's above the Bollinger line, a Buy trade is placed, but within the same bar it then crosses below the line, the strategy doesn't close out and go short and vice versa when part of the code is kicking off trades from the upper Bollinger line.
I'm using a 7 min chart on the HangSeng.
Any suggestions would be appreciated.
Thanks
Leonie
Comment