Bollinger break and return
Forums › ProRealTime English forum › ProOrder support › Bollinger break and return
- This topic has 3 replies, 2 voices, and was last updated 8 years ago by
roddersm.
-
-
08/27/2017 at 6:07 AM #44686
Hi Guys I’m brand new to this so please ignore any newb comments. I have my head around creating by Simplified Creation and have good results from my simple strategy but I want to refine this with programming to minimise losses. I am using the below to simply define a position by break in bol and then exiting 6 candles after. Testing 30min Aus200 is good and I’m really happy with the 1hr US Dollar, AUDUSD and EURUSD. Trading 20 units Aus200 $1 contract and 20 units on the FX Mini’s with 2k account.
Ideally I want to enter on the current candle but it appears this is not possible? If so then I think I just need to define the following candle is also outside Bol. At the moment of course I am entering on the next candle and often it will spike with that 30min/1hr candle and the entry on the next candle may be back in the band. All successful trades show the following candle is also outside bol to enter correctly. All backtested losses are from single spikes.
Finally, I would also like to define a value for how much over bol it goes before entering but can’t seem to get this working either
I appreciate any feedback or comments with my strategy.
Bollinger Break123456789101112131415161718192021222324252627282930313233343536// Definition of code parametersDEFPARAM CumulateOrders = False // Cumulating positions deactivated// Conditions to enter long positionsindicator1 = BollingerDown[20](close)c1 = (close CROSSES OVER indicator1)IF c1 THENBUY 20 CONTRACT AT MARKETENDIF// Conditions to exit long positionsif intradaybarindex-tradeindex =6 thenif longonmarket thensell at marketelsif shortonmarket thenexitshort at marketendifendif// Conditions to enter short positionsindicator3 = BollingerUp[20](close)c3 = (close CROSSES OVER indicator3)IF c3 THENSELLSHORT 20 CONTRACT AT MARKETENDIF// Conditions to exit short positionsif intradaybarindex-tradeindex =6 thenif longonmarket thensell at marketelsif shortonmarket thenexitshort at marketendifendif08/27/2017 at 9:44 AM #4469408/27/2017 at 9:55 AM #4469508/28/2017 at 12:41 AM #44728 -
AuthorPosts
