Problem with drawing indicators in mql5

 

Hello,

A strange problem I am facing in drawing indicators in mql5 , I have not encountered this problem in mql4 

The problem is when developing an indicator that draws lines on the chart, when the timeframe is changed, the lines are not erased in the old price position, and the chart appears poorly

I tried to find something suitable for deleting the old values before adding the new ones, but all the codes I found by searching did not help.

Wait for help, thanks

Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
Documentation on MQL5: Constants, Enumerations and Structures / Indicator Constants / Drawing Styles
  • www.mql5.com
Drawing Styles - Indicator Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the file.
     How To Ask Questions The Smart Way. (2004
          Be precise and informative about your problem

We can't see your broken code.

Fix your broken code.

With the information you've provided — we can only guess. And you haven't provided any useful information for that.

 
el3reef:

Hello,

A strange problem I am facing in drawing indicators in mql5 , I have not encountered this problem in mql4 

The problem is when developing an indicator that draws lines on the chart, when the timeframe is changed, the lines are not erased in the old price position, and the chart appears poorly

I tried to find something suitable for deleting the old values before adding the new ones, but all the codes I found by searching did not help.

Wait for help, thanks

Here is a bunch of knowledge to migrate MQL4 to MQL5:

https://www.mql5.com/en/articles/81
https://www.mql5.com/en/articles/66
https://www.mql5.com/en/forum/179991 // MT4 => MT5 converter
https://www.mql5.com/en/articles/4951
https://www.mql5.com/en/code/16006  // mt4 orders to mt5

Migrating from MQL4 to MQL5
Migrating from MQL4 to MQL5
  • www.mql5.com
This article is a quick guide to MQL4 language functions, it will help you to migrate your programs from MQL4 to MQL5. For each MQL4 function (except trading functions) the description and MQL5 implementation are presented, it allows you to reduce the conversion time significantly. For convenience, the MQL4 functions are divided into groups, similar to MQL4 Reference.