Hull average cross over strategy – where I am going wrong?

Forums ProRealTime English forum ProOrder support Hull average cross over strategy – where I am going wrong?

Viewing 15 posts - 1 through 15 (of 53 total)
  • #167721

    Could someone please advise me here?

    I am developing a crossover type of trading system using aligning (< < or >>) HullAverage indicators for long and short triggers. The system performs well in BT, but I need to convert it for testing on the AUTO demo system. (It either triggers on every candle, or not at all)

    This system is designed to trade intraday swings on the EUR/USD 1-Min bars.  At each new bar, I press BT and only follow the direction of the two HullAverage indicators when they both align with each other – either up (long trigger) or down (short trigger).

    I have attached a very shortened version of this system here, because it contains a few hundred lines of code due to its multiple variables. I inserted both the BT version and the corresponding AUTO format on the same page to make it easier for you to compare the two systems.

    I would greatly appreciate someone having a look at this code in case you can see something wrong with it.

    Thanking you!

     

     

     

     

     

    #167723

    Can you post the code?

     

    1 user thanked author for this post.
    #167755

    8ficusst – One place you are going wrong is by not giving your topic a meaningful title!

    • Give your topic a meaningful title. Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.

     

    I changed your title to something that describes your topic.

    1 user thanked author for this post.
    #167760

    Point taken, thanks.

    #167766

    I posted the code as Roberto asked so then the coding wizards can readily spot any problems without having to download the .itf file.

     

    #167767

    Hi Robertogozzi

    Thanks for your reply – please find the code attached here.

     

    #167769

    Thanks Gra

    My apologies. I was not sure.

    #167770

    Correction

    Line 5 note should read: // c and d variables: 900-950-50

    Apologies.

    #167777

    Does adding not onmarket as below sort your problem?

     

     

    #167783

    GraHa – the “if NOT ONMARKET” instruction would be OK for the first trade when it is not yet onmarket, but thereafter the code itself keeps it always on market (it never exits – it just changes from shorts to longs, or vice versa), therefore the “if NOT ONMARKET” instruction would surely prevent it from being able to trigger another trade? Please correct me if my thinking is wrong about this?

    #167785

    Thanks, I am trying it out with NOT ONMARKET just in case it will solve the problem.

    Will let you know the outcome.

    #167809

    Gra, no luck with NOT ONMARKET……. it only allows one trade and wont trigger after that.

    Maybe someone else has an idea to get it operating like the BT does?

    #167810

    Did you try below …

     

    #167811

    Anyway, why can’t / don’t you trade your backtest version … it contains Buy and Sellshort and you say it is the same as the Auto version??

     

    #167812

    In fact why don’t you throw it all in together and get attached!? 🙂

    Weird … PRT isn’t even stopping it working in ProOrder due to GRAPH in the code … I inadvertently left it in??

Viewing 15 posts - 1 through 15 (of 53 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login