Dynamic Zone Elasticity, division by zero
Forums › ProRealTime English forum › ProOrder support › Dynamic Zone Elasticity, division by zero
- This topic has 57 replies, 10 voices, and was last updated 2 years ago by deletedaccount051022.
-
-
07/15/2021 at 5:54 PM #173682
@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.
1 user thanked author for this post.
07/19/2021 at 10:25 AM #173796Hi @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
1234simple = average[result](close)c3 = simple crosses over resultc4 = simple crosses under result07/19/2021 at 10:33 AM #173797Found it – typo. N = optimized variable
1234simple = average[N](result)c3 = simple crosses over resultc4 = simple crosses under result07/19/2021 at 10:42 AM #1737981234simple = average[25](result)c3 = result crosses over simplec4 = result crosses under simple07/19/2021 at 11:22 AM #173799Here 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.
07/19/2021 at 11:59 AM #173805Thats an interesting way of doing it. Ill test it out.
I simply used –
1RESULT2 = 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
1 user thanked author for this post.
07/19/2021 at 1:05 PM #17380807/19/2021 at 1:08 PM #173810All lines starting with GRAPH and GRAPHONPRICE must be either removed or commented out, for autotrading.
07/23/2021 at 8:23 AM #174026It 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
07/23/2021 at 8:51 AM #174031Never 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 ??
07/23/2021 at 9:28 AM #174043Hi 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
07/23/2021 at 9:30 AM #174045Check 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.
1 user thanked author for this post.
07/29/2021 at 2:42 PM #174341Might 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.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on