Unable to back test RSI and Hull average strategy

Viewing 9 posts - 46 through 54 (of 54 total)
  • Author
    Posts
  • #134926 quote
    GraHal
    Participant
    Master

    This variable is not used in the code:tradetime”

    Did you use TradeTime between  an If  Then statement?

    #135203 quote
    bearbull
    Participant
    Average

    GraHal,

    You are correct, I did not use Tradetime between an If and then statement – thanks for that.

    As an aside……………If you create two separate strategies, can they be both used at the same time on one market?, or only one strategy at a time can be used on a that particular market ?

    thanking you

    #135206 quote
    GraHal
    Participant
    Master

    can they be both used at the same time on one market?,

    Yes 2 separate Strategies can be run at the same time on the same instrument, even at the same Timeframe.

    Only problem you may occasionally experience is that if 2 trades on the same instrument in the same direction are attempting to be executed at exactly the same time then 1 trade may be delayed for a few milliseconds.   Not much of a hardship I’d say? 🙂

    #135995 quote
    bearbull
    Participant
    Average

    GraHal

    Thank you for that. I’m thick LOL and so could not get this strategy to work in one system.

    So I have created (with your help) two separate systems, one to go long, and one to go short on a 15 minute time frame for the DAX – very simple.

    BUT…..eg-  I ran then both live this morning 08.00-12.00 and it made a loss (-48.50) on the long side and a profit (+47.20) on the short side.

    Immediately ‘back-testing’ it in the same hours, it made a loss (-26.00) on the long side and a profit (+149.00) on the short side???

    Its used in a spread bet account with IG (DAX spread 1.2 and IG take their cut of £1.20) so that is all covered. Trading £1/pip.

    …………….am I missing something? I knew that it wouldn’t be perfect re slippage etc but this is a vast difference between trading live and back test.

    I have attached both the separate codes……….

    I am obviously missing something fundamental here?

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    // The system will cancel all pending orders and close all positions at 0:00. No new ones will be allowed until after the "FLATBEFORE" time.
    DEFPARAM FLATBEFORE = 080000
    // Cancel all pending orders and close all positions at the "FLATAFTER" time
    DEFPARAM FLATAFTER = 163000
    
    
    // Enter Long
    C1 = CLOSE
    C2 = OPEN
    C3 = CLOSE>OPEN
    
    IF C1 AND C2 AND C3 THEN
    BUY 1 PERPOINT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP pTRAILING 4
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    // The system will cancel all pending orders and close all positions at 0:00. No new ones will be allowed until after the "FLATBEFORE" time.
    DEFPARAM FLATBEFORE = 080000
    // Cancel all pending orders and close all positions at the "FLATAFTER" time
    DEFPARAM FLATAFTER = 163000
    
    // Enter short
    C1 = CLOSE
    C2 = OPEN
    C3 = CLOSE>OPEN
    
    IF C1 AND C2 AND C3 THEN
    SELLSHORT 1 PERPOINT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP pTRAILING 4
    #136018 quote
    bearbull
    Participant
    Average

    ……..just dont get it?

    Dax 08:00 – 16:30 live results

    Live Long  -76.20, Live Short +52.00 =  -£24.20

    Dax 08:00 – 16:30 back test results

    Backtest Long +11.00. Backtest short +252.00 = +263.00

    See attached results of the long and short back tests………

    dax-15m-long.png dax-15m-long.png dax-15m-short.png dax-15m-short.png
    #136022 quote
    GraHal
    Participant
    Master

    You sure you have the tick by tick box enabled?

    With TS = 4 … I would have expected the only one making any money Long or Short would be IG??

    #136025 quote
    Paul
    Participant
    Master

    @bearbull ptrailing should not be used cause it doesn’t work tick by tick. Better use a hard stoploss & a trailing stop from the forum.

    #136027 quote
    bearbull
    Participant
    Average

    Grahal

    Thanks for getting back to me.

    So back testing is not reliable then? As the results do not reflect the true market? Yes, activating the tick by tick changes the results……or should I say reduces the results. LOL

    GraHal thanked this post
    #136028 quote
    bearbull
    Participant
    Average

    Paul,

    Thanks for your advice, will search the form for a trailing stop code to use.

Viewing 9 posts - 46 through 54 (of 54 total)
  • You must be logged in to reply to this topic.

Unable to back test RSI and Hull average strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
bearbull @bearbull Participant
Summary

This topic contains 53 replies,
has 5 voices, and was last updated by bearbull
5 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/21/2020
Status: Active
Attachments: 9 files
Logo Logo
Loading...