Download MetaTrader 5
To add comments, please log in or register
Sign up to publish an article and receive 200 USD
Sherif Hasan
7224
Sherif Hasan 2014.12.30 06:26 

Is this possible to apply default template for my EA?

because when my EA applies text are invisible while background colour are same. so i would like to apply default template when EA applied.

Please suggest me to solve this issue?

Keith Watford
Moderator
8008
Keith Watford 2014.12.30 07:51  
ChartApplyTemplate()
Sherif Hasan
7224
Sherif Hasan 2014.12.30 08:48  
GumRai:
ChartApplyTemplate()

tried:

ChartApplyTemplate(0,"Filesmy_template.tpl");


Error:

'ChartApplyTemplate' - function is not defined
honest_knave
969
honest_knave 2014.12.30 09:39  

What you have posted compiles without error on Build 996.

Alternatively, you can control the chart colors directly:

   ChartSetInteger(0,CHART_COLOR_BACKGROUND,clrBlack);
   ChartSetInteger(0,CHART_COLOR_FOREGROUND,clrWhite);

And many others - see Chart Properties

Keith Watford
Moderator
8008
Keith Watford 2014.12.30 10:51  
honest_knave:

What you have posted compiles without error on Build 996.

Yes, I confirm that it works on build 966

I have used the function a few times recently and it has always worked on recent builds 

Sherif Hasan
7224
Sherif Hasan 2014.12.30 14:35  
GumRai:

Yes, I confirm that it works on build 966

I have used the function a few times recently and it has always worked on recent builds 

Yes. Working. but one issues is when EA started template is applied and immediately EA stopped?
Keith Watford
Moderator
8008
Keith Watford 2014.12.30 20:06  
sheriffonline:
Yes. Working. but one issues is when EA started template is applied and immediately EA stopped?

Oh yes.

If the template that you are changing to doesn't have the EA attached, then the EA will be removed when you apply the template.

Probably better to do as Honest knave suggests and change the chart properties or add the text colour as an input for the EA 

or change the template before attaching the EA 

Sherif Hasan
7224
Sherif Hasan 2015.01.01 07:19  
GumRai:

Oh yes.

If the template that you are changing to doesn't have the EA attached, then the EA will be removed when you apply the template.

Probably better to do as Honest knave suggests and change the chart properties or add the text colour as an input for the EA 

or change the template before attaching the EA 

 

Yes. Thanks. I changed the template before EA attached

before i coded EA works and at end of the coding i appled template. so EA stopped.


Thanks GumRaj.

/
To add comments, please log in or register