DislikedHey guys, I have been facing an issue with my EA. I am not very experienced in coding, so maybe I am asking a stupid question, but I have to ask it. My EA uses HLines, that I put on chart, as a signal for trading. That is defined by Low [2] < HLine && High [2] > HLine. If the next candle with High [1], Low [1], Close [1], Open [1] is bellow or above HLine, that is a signal for trade on Open [0]. But sometimes my EA opens trades where it should open, sometimes doesn't, and after a while, it just stops. Sometimes happens divided by zero issue. Can...Ignored
- first thing that comes to mind is that you're looping through all objects to get a single price value from each, but some objects may not have a single price value, or any price value, so check that the obejct you're reading is a hline in the first place, maybe add a tag in the string name of the hline/s so you only look at hlines you want to, or print out each price value u get and manually compare to whats on the chart to see you're getting what you want