Bollinger break and return

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #44686 quote
    roddersm
    Participant
    New

    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.

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter long positions
    indicator1 = BollingerDown[20](close)
    c1 = (close CROSSES OVER indicator1)
    
    IF c1 THEN
    BUY 20 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    if intradaybarindex-tradeindex =6 then
    if longonmarket then
    sell at market
    elsif shortonmarket then
    exitshort at market
    endif
    endif
    
    // Conditions to enter short positions
    indicator3 = BollingerUp[20](close)
    c3 = (close CROSSES OVER indicator3)
    
    IF c3 THEN
    SELLSHORT 20 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    if intradaybarindex-tradeindex =6 then
    if longonmarket then
    sell at market
    elsif shortonmarket then
    exitshort at market
    endif
    endif
    
    Best-Result-Aus200-30min.png Best-Result-Aus200-30min.png Best-Results-US-Dollar-1hr.png Best-Results-US-Dollar-1hr.png Best-Result-AUDUSD-1hr.png Best-Result-AUDUSD-1hr.png Best-Results-EURUSD-1hr.png Best-Results-EURUSD-1hr.png
    #44694 quote
    Despair
    Blocked
    Master

    Did you try running a little bit longer backtest? All your screenshots show only 1-2 month of test.

    #44695 quote
    Despair
    Blocked
    Master

    Here the results for a longer backtest. If you want to work more on this I would recommend exploring some filters. Your strategy is basically always in the market. Reducing this time might improve the result.

    Bollinger-ASX.png Bollinger-ASX.png
    #44728 quote
    roddersm
    Participant
    New

    Thanks for that. Yes thats exactly what I need to learn

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Bollinger break and return


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
roddersm @roddersm Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by roddersm
8 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/27/2017
Status: Active
Attachments: 5 files
Logo Logo
Loading...