@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.
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
Found it – typo. N = optimized variable
simple = average[N](result)
c3 = simple crosses over result
c4 = simple crosses under result
simple = average[25](result)
c3 = result crosses over simple
c4 = result crosses under simple
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.
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
All lines starting with GRAPH and GRAPHONPRICE must be either removed or commented out, for autotrading.
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
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 ??
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
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
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.