is it possible to set the colors of the indicators of the expert advisors?

 

hi, in the expert advisor I am writing there are 2 sma, I would like to make sure that they are colored differently in the strategy tester because they are both red. If possible I would like to show them also when I attach the EA to the chart.
there's a way?


thanks

 
CaneRandagio :

hi, in the expert advisor I am writing there are 2 sma, I would like to make sure that they are colored differently in the strategy tester because they are both red. If possible I would like to show them also when I attach the EA to the chart.
there's a way?


thanks

To do this, you need to use a CUSTOM indicator - an indicator with the COLOR of the line in the input parameters. Thus, from an Expert Advisor (when creating an indicator handle) you can immediately set the line color.

An example of such an indicator: Custom Moving Average Input Color

Custom Moving Average Input Color
Custom Moving Average Input Color
  • www.mql5.com
A modification of the "Custom Moving Average" indicator: now the line color can be passed in input parameters.
 
ok thanks, take a look at it
Reason: