How to set indicator colors for Strategy Tester

 

Hello!

I am coding an EA that uses 3 moving average indicators. The indicators are visible on Strategy tester but they are all the same color.

I created a template with the same name as my EA and set colors but this created problems of its own.

problem 1: The old red indicator lines are still visible on Strategy Tester and they overlap with the indicators from the template.

problem 2: The indicators from the template stay the same when I change the periods of the indicators from the code.

Thank you in advance

 
mirac baver ozturk:

Hello!

I am coding an EA that uses 3 moving average indicators. The indicators are visible on Strategy tester but they are all the same color.

I created a template with the same name as my EA and set colors but this created problems of its own.

problem 1: The old red indicator lines are still visible on Strategy Tester and they overlap with the indicators from the template.

problem 2: The indicators from the template stay the same when I change the periods of the indicators from the code.

Thank you in advance

HideTestIndicators(true);

This will hide the strategy tester indicators. You will just get the template of your own on chart.

 
Yashar Seyyedin #:

This will hide the strategy tester indicators. You will just get the template of your own on chart.

This resolves the problem 1. However, problem 2 remains. I don't want to hide them. I want to change their appearance.
 
mirac baver ozturk #:
This resolves the problem 1. However, problem 2 remains. I don't want to hide them. I want to change their appearance.

you have two solutions for problem 2: 

1. create template file dynamically from inside the code.

2. create custom MA indicators to use instead of default MAs with color and period as input.