I am trying to create a strategy based on bollinger bands, but something must be wrong as only 1 trade is being made over a year which doesn't make sense as mutliple trades should be made each day...

The concept is:

The system should only trade between 10 pm and 8 am UTC, and a trade should only be made if there are no other open positions.

If the closing price of the EURUSD is above or equal to the Upper Bollinger band, then Sell. The trade should be closed when the price hits the lower bollinger band or it should be stopped out if the price hits the Stop (Which is set as the upper bollinger band at 6 std dev)

And if the closing price of the EURUSD is below or equal to the Lower Bollinger band, then Buy. The trade should be closed when the price hits the Upper bollinger band or it should be stopped out if the price hits the Stop (Which is set as the lower bollinger band at 6 std dev)

 

I can't figure out what is wrong in my code as only 1 trade is being made over a year period. Anyone can help?

Author