I manage to get this working by disabling all lines that had "ObjectsDeleteAll(0,OBJ_RECTANGLE);". I can now draw rectangles. It works how I want it to work and I can now draw rectangles and they don't disappear. I have not seen any consequences for removing those lines from the code.frandunk1991 wrote: Thu Jan 28, 2021 3:53 am Hi mrtools, this is regards to one of the older indicators in this post. the MTF_HI_LOW.mq4 indicator which is an amazing indicator. there is only one issue with the indicator and that is its not allowing us to draw rectangles. we can draw other objects such as trendlines and circles but it seem to auto remove/delete rectangles when ever drawn. I didn't see any errors in mt4 journal either while loading the indicator so unsure of a solution.
Would greatly appreciate if you could take a look and see if there is a solution for this. thanks in advance if you do
mt4 issue.png
mtf_hi_low.mq4
here is the updated version. EDIT: it seems those lines of code with conjunction with other lines of codes, deletes All rectangles per tick. I noticed it doesn't deleted the rectangles when the market is closed, which means there is some per tick statements in the code. I'm not a coder, I just used slight common sense and started disabling anything with Delete or rectangle in the Code and I eventually found this solution that worked for me. This might not work for everyone, and if it doesn't I suggest asking someone else on the forum to check it out further.