Bollinger and EMA on 10min (SA Top 40)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #20100 quote
    Jdupisanie
    Participant
    New

    Hi all,

    This is my first entry, so please forgive and advise if I’m doing something wrong.

    Created a very basic strategy using Bollinger and Exponential Moving Average. Strategy tested on South African Top 40.

    BUY: Price above 1 std and EMA[20] crosses over EMA[50].

    SELL: Price below EMA[20]

    Some observations:

    1. Not doing any short selling on this (yet). My initial idea is to create a relatively low risk/low return strategy for now.
    2. Work well on 10min bars, but less so on 15min and 5min. Should it be a concern if a strategy seem so specific to a particular time.
    3. Number of gains and losses are very similar. I set a very small stop-loss (0.5%) to try and get out of any loss making trade as soon as possible.

    Any comments/feedback will be highly appreciated.

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter long positions
    indicator1 = Average[20](close)
    indicator2 = Average[50](close)
    c1 = (indicator1 CROSSES OVER indicator2)
    
    indicator3 = close
    indicator4 = Average[20](close)+std[20](close)
    c2 = (indicator3 >= indicator4)
    c3 = (indicator3 <= indicator4)
    
    IF c1 AND c2 THEN
    BUY 2 CONTRACT AT MARKET
    ENDIF
    
    IF c3 THEN
    SELL 2 CONTRACT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP %LOSS 0.5
    SET TARGET %PROFIT 5
    
    dbb-and-ema-pic-1483774386cpl841.png dbb-and-ema-pic-1483774386cpl841.png
    #20105 quote
    Wing
    Participant
    Veteran

    Hello.

    The amount of trades, 53, is not enough to evaluate the robustness of this system. Try the system with more data, on another index/commodity, and/or add a short side to give you more simulated trades.

    Since the system is not intraday only, know that overnight fees may add to the transaction costs. Since it can sell at any time of day, the spreads will also be different.

    A profit target and stop loss based on averagetruerange[10] might do better than one that does not take volatility into account.

    If you can, optimize your SL and TP on at least 100 trades, then test the resulting system OOS (out-of-sample). This will tell you if the system can be trusted or not to function in an unknown environment.

    #20111 quote
    Nicolas
    Keymaster
    Master

    Thank you for posting your trading strategy code. I have moved your submission from the Library pending queue to a new forum topic instead. Like Wing has already said, your strategy would need further investigation and improvement as it seems it were only tested on a short time period. What is the SA40 spread?

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

Bollinger and EMA on 10min (SA Top 40)


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Jdupisanie @jdupisanie Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Nicolas
9 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/07/2017
Status: Active
Attachments: No files
Logo Logo
Loading...