Download MetaTrader 5

Default Template for EA?

To add comments, please log in or register
Sherif Hasan
7293
Sherif Hasan  

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
9641
Keith Watford  
ChartApplyTemplate()
Sherif Hasan
7293
Sherif Hasan  
GumRai:
ChartApplyTemplate()

tried:

ChartApplyTemplate(0,"Filesmy_template.tpl");


Error:

'ChartApplyTemplate' - function is not defined
honest_knave
Moderator
2420
honest_knave  

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
9641
Keith Watford  
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
7293
Sherif Hasan  
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
9641
Keith Watford  
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
7293
Sherif Hasan  
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