Changing the default line colors for ima indicator from an EA

To add comments, please log in or register
brad
46
brad  

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

jordarro
102
jordarro  
Maybe with ObjectSet, I'm not sure if it works for indicators...
Simon Gniadkowski
17213
Simon Gniadkowski  
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.
qjol
3196
qjol  
maake your own indicator & use indicator_color1
William Roeder
20210
William Roeder  
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
transAct
19
transAct  
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

William Roeder
20210
William Roeder  
from my code: double Point_2 = Point/2; see Can price != price ? - MQL4 forum
CoDar
5
CoDar  
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);
Keith Watford
Moderator
20377
Keith Watford  
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?

To add comments, please log in or register