Averaging down code

Forums ProRealTime English forum ProOrder support Averaging down code

Viewing 6 posts - 1 through 6 (of 6 total)
  • #118459

    Hi, I have added this averaging down code to the bottom of a strategy and changed cumulateorders to true but I get an error saying that haopen and haclose are undefined.

    What else do I need to do?

     

     

     

    #118462

    haopen and haclose need to be defined somewhere in the code. I suspect you have borrowed the snippet from someone that was using it in a hiekin ashi strategy where haclose and haopen were the calculated values for the HA candles.

    #118467

    This is the HA setup to be added to your code, at the beginning:

    any reference to unused variable shall be commented out.

     

    #118488

    Thanks Roberto, but I’m still a bit confused as Heikin-Ashi is new territory for me. I got the snippet here:

    https://www.prorealcode.com/blog/trading/averaging-techniques-automated-trading/

    Is Heikin-Ashi an essential component to the averaging down technique? or is it a part of the main strategy in Nicolas’s example?

     

    #118492

    This is the code I’m modifying, as devised by Soulintact. It’s a buy and hold strategy that only sells when in profit and I thought it ‘might’ benefit from averaging down.

    Might also crash and burn.

    I have tried adding your Heikin-Ashi definition at the top but not sure if I’m doing it right. Does not seem to have the expected effect.

     

    #118493

    Averaging down can be done on both common japanese and HA candlesticks.

    Use CLOSE, OPEN, HIGH and LOW when you want to use common candlesticks.

    1 user thanked author for this post.
Viewing 6 posts - 1 through 6 (of 6 total)

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