- 12 Nov 2016, 17:51
#273
Today, I inaugurate the coding tips forum.
In the future, we will try to share coding tips to improve or adds functionality to your MT4 tools.
Let’s start with a basic idea.
With this piece of code, you can change your chart’s foreground colour to highlight the current trend or a potential setup.
Here the code:
In the future, we will try to share coding tips to improve or adds functionality to your MT4 tools.
Let’s start with a basic idea.
With this piece of code, you can change your chart’s foreground colour to highlight the current trend or a potential setup.
Here the code:
Code: Select all
Here the result:extern string AA01 = "Foreground color in line with Trend";
extern string AA02 = "==== Chart Foreground settings ====";
extern bool Change_Chart_Foreground = true;
extern color Foreground_neutral = White;
extern color Foreground_up = ForestGreen;
extern color Foreground_down = Maroon;
if(Change_Chart_Foreground)
{
ChartSetInteger(0, CHART_COLOR_FOREGROUND, Foreground_neutral);
if(Trend is up) ChartSetInteger(0, CHART_COLOR_FOREGROUND, Foreground_up);
else if(Trend is down) ChartSetInteger(0, CHART_COLOR_FOREGROUND, Foreground_down);
}
You do not have the required permissions to view the files attached to this post.
Cheers,
G
G