How to set the color of a moving average?

 

How to set the color of a moving average in an EA,since i cant find any parameter to set it

double iMA( string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift) 

Any suggestions? TY

 
Proximus:

How to set the color of a moving average in an EA,since i cant find any parameter to set it

Any suggestions? TY

You can't.
 
  1. iMA() just returns a value. There are no colors. There are no lines.
  2. Look in the code base and find a colored MA indicator.
 
WHRoeder:
  1. iMA() just returns a value. There are no colors. There are no lines.
  2. Look in the code base and find a colored MA indicator.
On the backtest screen it draws an MA, but it will always draw a red one, i thought that color could be changed somehow with code.
 
Proximus:
On the backtest screen it draws an MA, but it will always draw a red one, i thought that color could be changed somehow with code.


As I remember the tester screen appears according to tester.tpl

 
szgy74:

As I remember the tester screen appears according to tester.tpl


Either <EA_Name>.tpl or tester.tpl

There you can set your indicator with the needed colors, and it will be automatically used by the strategy tester.

 
szgy74:

As I remember the tester screen appears according to tester.tpl



Where can i find this tester.tpl ?
 
Proximus:

Where can i find this tester.tpl ?

you have to create (save) it, just like the way you save any other template.
 
szgy74:

you have to create (save) it, just like the way you save any other template.
So you tell that if the EA's name is for example: JONNY 1.mq4 i create a template file and save it to the default location (MetaTrader\templates) where the other files are named JONNY 1.tpl and it will work?
 

Guys, 

I know this is an old thread, but if you save a .tpl file with the same name as the EA, you can change the appearance of lines for example.

 
Proximus i create a template file and save it to the default location (MetaTrader\templates)
The location is <DataFolder>\templates
          Data Structure in MetaTrader 4 Build 600 and Higher - MQL4 Articles 2014.02.03
Reason: