Dynamic Zone Elasticity, division by zero

Viewing 13 posts - 46 through 58 (of 58 total)
  • Author
    Posts
  • #173682 quote
    Monochrome
    Participant
    Senior

    @Grahal

    Wow this brings back memories haha. I made that code a loong time ago. Im suprised its brought up again.

    I realised the premise of the original code was all wrong and ditched it. I took a few months break but im still working on a variation of that code i think has potential.

    One small tip is to add a lagging smoothed line to use as a cross over instead of the “top” and “bot” lines, across all copies. Reduces lagg. Also changing smoothing period along with avg period i felt gave better results.

    The entries are great on some markets. If we can crack the exit code along with an entry filter , I think it has great potential.

    GraHal thanked this post
    #173796 quote
    deletedaccount051022
    Participant
    New

    Hi @Monochrome,

    Thank you for the top tip.

    Can anyone help please – Am just trying to insert a simple moving average on the “result” and use a cross over signal but no joy.  Can someone tell me what I am doing wrong please?

    Thank you

    simple = average[result](close)
    
    c3 = simple crosses over result
    c4 = simple crosses under result
    
    #173797 quote
    deletedaccount051022
    Participant
    New

    Found it – typo.  N = optimized variable

    simple = average[N](result)
    
    c3 = simple crosses over result
    c4 = simple crosses under result
    #173798 quote
    deletedaccount051022
    Participant
    New
    simple = average[25](result)
    
    c3 = result crosses over simple
    c4 = result crosses under simple
    #173799 quote
    deletedaccount051022
    Participant
    New

    Here is the latest TEST version I am experimenting with.  Running at 1 contract with the following adjustments;

    -Do not open new positions on a Wednesday

    -Added simple MA of Results variable

    Thank you once again for sharing, great to play around with.

    PRD-DynamElast-NDQ-1m-V1.2.itf
    #173805 quote
    Monochrome
    Participant
    Senior

    Thats an interesting way of doing it. Ill test it out.

    I simply used –

    RESULT2 = average[3](result)

    Only when the crosses over happens below or above the top or bot line. Across all copies.

    Also i really like your clean format of arranging the code. I gotta learn that haha

    thanked this post
    #173808 quote
    murre87
    Participant
    Senior

    Got this error

    1-1.jpg 1-1.jpg
    #173810 quote
    robertogozzi
    Moderator
    Master

    All lines starting with GRAPH and GRAPHONPRICE must be either removed or commented out, for autotrading.

    #174026 quote
    deletedaccount051022
    Participant
    New

    It was going so well this week.  The system stopped this morning due the division by zero error and now I get a Preloadbars error.  I’ve increased this from 10k to 200k but it still fails.  Has anyone had this error before?  Thanks

    #174031 quote
    nonetheless
    Participant
    Master

    Never had a problem with preloadbars, but worth noting that 10k is the max, so anything above that is doing nothing.

    I’ve been running NAS 1m DZE v5 live for a couple weeks with no problems so the div/0 may be largely a demo issue ??

    #174043 quote
    deletedaccount051022
    Participant
    New

    Hi nonetheless

    Thanks for your reply.  I have made a note of the preloadbar limit, good to know.

    I’ve been running it live since last week and it just stopped out this morning.  I shall revert back to the original code in v5, but I believe the only change I had made was to not trade Wednesdays currently.

     

    Thanks

    #174045 quote
    robertogozzi
    Moderator
    Master

    Check that all periods within brackets have a “normal” period number, such as 10, 20, 200 or 500 and not 10000 or 15000!

    This may happen if some period numbers are not simple constants but are the result of an expression, or use BARINDEX or the like incorrectly.

    thanked this post
    #174341 quote
    deletedaccount051022
    Participant
    New

    Might have a clue to the root cause of the Divide by Zero error.  The NASDAQ 1 min version just halted in production with the same error, and I note that there was a gap in the candles at the time the strategy was stopped.

    Am trying a few things to normalise the value if this occurs.

    I checked Roberto’s suggestion (grazie mille), the period is set to 20, a “normal” period.

    nonetheless thanked this post
    Divide-by-zero-error-gap.png Divide-by-zero-error-gap.png
Viewing 13 posts - 46 through 58 (of 58 total)
  • You must be logged in to reply to this topic.

Dynamic Zone Elasticity, division by zero


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 57 replies,
has 10 voices, and was last updated by deletedaccount051022
4 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/08/2021
Status: Active
Attachments: 14 files
Logo Logo
Loading...