solved
I have a script that draws some trend lines on a chart. It uses the same piece of code to draw each of the trend lines as follows:
ObjectCreate(0,"ABCL"+eNextNode, OBJ_TREND, 0, dtNodeTime[eNextNode -1], dNodePrice[eNextNode -1] , dtNodeTime[eNextNode], dNodePrice[eNextNode]);
ObjectSetInteger(0,"ABCL"+eNextNode,OBJPROP_COLOR,cWaveLine);
The code works fine the issues is the first line that it creates changes color on the chart if you close the terminal and reopen it....
Now bear in mind this is a script that created the objects so it won't be running when you restart.
The color that it changes to is clrGoldenRod which is what I had the lines set to originally, but have sine changed the value of cWaveLine to clrDeepSkyBlue.
If I select and check the object the colour is set correct to DeepSkyblue but appears as GoldenRod on the chart.
For completeness I also deleted all objects from the chart and started again but the same thing happens.
So it seems that somehow MT5 has remembered the original setting for a single object that has been deleted and recreated since, and applies that memory on restart.
How can I solve this annoying issue please?
thanks
Hi MaxTrader,
1 hour 15 minutes, but how ?
Congrats though.
:D
Hi MaxTrader,
1 hour 15 minutes, but how ?
Congrats though.
:D
Simple enough really, my script was also creating a fib retracement between the same two points and I completely forgot that a fib retracement also puts the trend line in, and this with its defaul colours was laying ontop of the line object I had created.
looked very confusing but actually a simple issue
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have a script that draws some trend lines on a chart. It uses the same piece of code to draw each of the trend lines as follows:
ObjectCreate(0,"ABCL"+eNextNode, OBJ_TREND, 0, dtNodeTime[eNextNode -1], dNodePrice[eNextNode -1] , dtNodeTime[eNextNode], dNodePrice[eNextNode]);
ObjectSetInteger(0,"ABCL"+eNextNode,OBJPROP_COLOR,cWaveLine);
The code works fine the issues is the first line that it creates changes color on the chart if you close the terminal and reopen it....
Now bear in mind this is a script that created the objects so it won't be running when you restart.
The color that it changes to is clrGoldenRod which is what I had the lines set to originally, but have sine changed the value of cWaveLine to clrDeepSkyBlue.
If I select and check the object the colour is set correct to DeepSkyblue but appears as GoldenRod on the chart.
For completeness I also deleted all objects from the chart and started again but the same thing happens.
So it seems that somehow MT5 has remembered the original setting for a single object that has been deleted and recreated since, and applies that memory on restart.
How can I solve this annoying issue please?
thanks