Dynamic Zone Elasticity, division by zero

Forums ProRealTime English forum ProOrder support Dynamic Zone Elasticity, division by zero

Viewing 15 posts - 16 through 30 (of 58 total)
  • #157593

    Thanks Grahal, I’ll play around with it, load a bunch of variations in demo and see if anything sticks.

    1 user thanked author for this post.
    #172708

    @Monochrome  or anybody … are you still using the Algo below?

    I am getting a ‘negative paramater error message’ (new one from IG?? 🙁  ) anybody got a fix please?

    Dj-3min-Dynsuper-v1.2.itf

    Here’s the code if anybody can spot the source of the negative parameter please?

     

    #172709

    Do u find this algo intressting? Look at attached backtest

    #172712

    Funny you should ask, after my post above, I give it a critical eye and I ditched it in favour of trying None’s version from higher up this thread.

    I use Algos different than most anyway … if a trade goes into early profit, I then monitor progress and exit manually at some point, rarely leaving any Algo to exit all on it’s own! 🙂

    #172713

    Try this at line 149:

    and this at line 132:

    2 users thanked author for this post.
    #172871

    Funny you should ask, after my post above, I give it a critical eye and I ditched it in favour of trying None’s version from higher up this thread.

    Hey Grahal, thanks for reminding me about this one – could be worth another look. Here’s an fresh take on it, backtest looks good, but unfortunately when I loaded it up got the dreaded div/0 rejection almost immediately.

    There’s nothing out of the ordinary apart from the DZE code, and the only division there is x.

    I’ve tried fixing this at lines 61,62 but it doesn’t help.

    If anyone has a better way of stopping x from ever being zero I’d love to hear it

     

    #172873

    itf

    2 users thanked author for this post.
    #172917

    try deleting lines 61 – 63, change line 60 to

    it’s a dead simple solution but seems to work so far, opened a trade today with no rejections.

    2 users thanked author for this post.
    #172975

    I had a divide by zero stoppage this morning so I am trying below at Line 61 to see if it stops the stoppages! 🙂

    Here’s a thought, has anybody ever sent a Technical Report (on any Algo) to PRT asking “why is my Algo stopping and giving a divide by zeror error message”?

    I’m really fed up with divide by zero errors generally … why can’t PRT put some script in the backtest engine to detect the conditions which give divide by zero errors??

    #172987

    Yeah, mine got stopped as well. I’m now running it with

    as adding more than that starts to impact performance. Hasn’t been rejected … yet.

    Agreed about PRT, shouldn’t be too difficult for them to at least point out where the problem is.

    #173033

    The + 0.3 version took a trade yesterday. Also

    seems to work. I’m hoping this might be a generic solution for div/0 rejections, to be inserted wherever you’ve got a problematic division ???

    Could be worth trying.

     

     

     

    1 user thanked author for this post.
    #173034

    Yeah my idea below worked also and took a trade yesterday and ended in profit!

    Below is effectively the same as your code above, i.e. if 0 read 1.

    Our solutions make me think the divide by zero errors are mainly due to missing bars (bars with no price movement) and PRT must have some script in their backtest engine to produce the same result … if 0 read 1 ??

    Would we really want backtests to keep stopping and throw up divide by zero errors??

    Maybe we just live with / work around by adding our solution (if 0 read 1) to our strategy codes if / when we get divide by zero errors?  I have been doing this for a while anyway.

    Trouble is with complex / many lines of codes it is difficult to determine where the  divide by zero error originates, but then it would be just as difficult if the error was thrown up in backtest?

    On the strength of above discussion with myself 🙂 , I will not send a Contact Form to PRT for the  divide by zero error … unless anybody has any other thoughts?

    #173036

    Yes nonetheless, it’s a nice solution as it won’t affect subsequent calculations.

     

    1 user thanked author for this post.
    #173037

    GraHal, your solution can affect calculations as it will never allow divisions by 0.1…0.9 (or smaller decimals) or negative numbers, while nonetheless‘ will only change 0’s.

     

    1 user thanked author for this post.
    #173038

    The Master has spoken, the None’s have it then! 🙂

    I’ll change mine to None’s for next week!

     

    1 user thanked author for this post.
Viewing 15 posts - 16 through 30 (of 58 total)

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