I can't comment on your code, but I just finished a similar script that does something similar.
Files:
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
I've been trying to write a part of a Support and Resistance script, where a Horizontal Line is drawn where price has previously stalled, meaning that we've had either many closes at that price, or highs, or lows, or bars that have ranged across those levels.
Then the script merges levels that are less than x amount of pips away from each other, then it removes the "0"s from the array, and draws the objects.
Not all the levels that I can personally see on the charts are actually being drawn. What do you think is wrong in the code?