Changing the default line colors for ima indicator from an EA

 

Hello,

I have an EA that uses 3 ima indicators ma3, ma30 & ma60. The default on the chart is a red line for each. How can I change the defaults so I can get a different line color for each one. I want to do it in the EA using the MQ4 code. I do not want to manually have to change it in the chart window dialog box.


Any help would be appreciated.

Brad

 
Maybe with ObjectSet, I'm not sure if it works for indicators...
 
pitu:
Maybe with ObjectSet, I'm not sure if it works for indicators...
In general . . . Indicators don't use Objects so no, that won't work.
 
maake your own indicator & use indicator_color1
 
The indicators an EA uses are NOT shown on the chart. You can either add them to the chart, manually or via template (tester.tpl or default.tpl) with the exact parameters the EA is using. Or you can have the EA plot them with my polyline code
 
WHRoeder:
The indicators an EA uses are NOT shown on the chart. You can either add them to the chart, manually or via template (tester.tpl or default.tpl) with the exact parameters the EA is using. Or you can have the EA plot them with my polyline code


Hy,

WHRoeder, i'm trying to use the polyline function, what's the "Point_2" variable?

ThankU

 
from my code: double Point_2 = Point/2; see Can price != price ? - MQL4 forum
 
whroeder1:
from my code: double Point_2 = Point/2; see Can price != price ? - MQL4 forum

PlotIndexSetInteger

The function sets the value of the corresponding property of the corresponding indicator line. The indicator property must be of the int, char, bool or color type. There are 2 variants of the function.

Perhaps:

PlotIndexSetInteger(0,PLOT_LINE_COLOR,2,clrGreen);
 
CoDar:

PlotIndexSetInteger

The function sets the value of the corresponding property of the corresponding indicator line. The indicator property must be of the int, char, bool or color type. There are 2 variants of the function.

Perhaps:

PlotIndexSetInteger(0,PLOT_LINE_COLOR,2,clrGreen);

PlotIndexSetInteger() doesn't work in mql4 does it?