Part 2 in a series on writing indicators beginning with the basics. This part covers creating an indicator that alternates colours with the trend.
The code developed in this video is modified from the code in part 1. If you haven’t seen part 1 there is a link below.
The actual indicator used here is simple and probably not fit for use as an indicator but I wanted something simple so that I could focus on the code for displaying 2 colours and not worry about complexities of the indicator. The formula for the indicator is nothing more than the midpoint of 2 moving averages.
This video is for MT4. The aim is to not cause too much confustion and covering both MT5 and MT4 in the same video would do the opposite. There is a separate video for MT5 with a link below.
If you are looking for a broker for MT5 or MT4 consider supporting our channel by using our broker by following one of these links.