Indicators: Price prediction by Nearest Neighbor found by a weighted correlation coefficient - page 3
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
this code needs slight improvements but okayjustask your idea does make sense
I made very slight improvements to the code by:
- Adding a variable on the global scope for b, and
- Adding a lastPatternStartTime variable, a condition that compares it to a new pattern start time, and calls ChartRedraw() if they're not the same.
(From what I was able to discern in a few hours of testing, the vertical line chaos appeared when a new pattern was found).A couple more slight improvements:
The purpose of those changes is to make the indicator more suitable for automated trading. If you need more future price values for your purposes, just loop through bars 0 to 48 at the end of the code and update the GV value.
The purpose of those changes is to make the indicator more suitable for automated trading. If you need more future price values for your purposes, just loop through bars 0 to 48 at the end of the code and update the GV value.
Why is that? You can access any values from indicator buffers even from the future.
I've been able to do that in indicators but not in EA's. Do you have another example/Article that does so in an EA, please?
I've been able to do that in indicators but not in EA's. Do you have another example/Article that does so in an EA, please?
Please disregard my Post #24. I suspect that I've been using the wrong form of Copybuffer() in an EA. The correct one appears to be:
"[I]n the parameters CopyBuffer (first form) one must give offset equal to (- N)..."