How to set the color of a moving average?

To add comments, please log in or register
Proximus
772
Proximus  

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

Alain Verleyen
38685
Alain Verleyen  
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.
William Roeder
20214
William Roeder  
  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.
Proximus
772
Proximus  
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.
szgy74
247
szgy74  
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

Alain Verleyen
38685
Alain Verleyen  
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.

Proximus
772
Proximus  
szgy74:

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



Where can i find this tester.tpl ?
szgy74
247
szgy74  
Proximus:

Where can i find this tester.tpl ?

you have to create (save) it, just like the way you save any other template.
Proximus
772
Proximus  
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?
Rodolpho Nogueira De Sousa
293
Rodolpho Nogueira De Sousa  

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.

William Roeder
20214
William Roeder  
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
To add comments, please log in or register