Forum

Moving rectangle objects to swing points

Hello everyone, Fairly beginner coder here! I'm working on an EA which involves identifying swing prices and placing stop and profit targets using these points. As a fun visual addition, I am trying to figure out how to create a rectangle around each swing point. Although this may sound simple, I

Array out of range error

Hello everyone! I'm new to MQL5 programming and have been struggling with this issue for a while. I tried everything but couldn't get from point A to point B. Essentially, I want to loop through the previous six candles and add them to an array. However, I always get an array out of range error. I