For instance, i tend to draw divergence on my charts and combine it with trendlines. Sometimes i want to draw an orange trendline, but then a blue divergence line (so people looking can seperate the two). Obviously i can’t really do this from what i can see without changing the colour of the lines everytime?
Is there a way to somehow have two seperate lines of a different colour pre-saved?
You could remap some of the less important function keys in metatrader using a program like autoit. For instance bind F5 to a red trendline, F6 to a blue trendline. You would still have to hit the function key for the desired colour before using the trendline tool but it would a be a lot quicker than manually changing it through trendline properties. I can help you with the scripting side of it if you like, I use autoit to macro a few things in metatrader due to my own laziness.
I forgot to mention the file that you will be interested in will be terminal.ini in your metatrader/config folder. It has a key called Trendline_color it’s in the objects section. You would need to get autoit to check it when say a function key was hit and update the value if needed.
This is a very quick hack up for autoit so use at your own peril. A few things would need to be modified as well as checking if the current window is metatrader otherwise your F5 and F6 key will not function correctly in other programs.
HotKeySet("{F5}","Red_Trendline")
HotKeySet("{F6}","Blue_Trendline")
While 1
sleep(100);
Wend
Func Red_Trendline ()
if IniRead ( "C:\Program Files\OANDA - MetaTrader\config erminal.ini", "Objects", "Trendline_color", "" ) <> "255" Then
IniWrite ( "C:\Program Files\OANDA - MetaTrader\config erminal.ini", "Objects", "Trendline_color", "255" )
Endif
EndFunc
Func Blue_Trendline ()
if IniRead ( "C:\Program Files\OANDA - MetaTrader\config erminal.ini", "Objects", "Trendline_color", "" ) <> "16711680" Then
IniWrite ( "C:\Program Files\OANDA - MetaTrader\config erminal.ini", "Objects", "Trendline_color", "16711680" )
Endif
EndFunc
Or you could just draw two different colored lines on a chart, save a template of those two lines and just drag them to where you want them to be on each new chart the template is applied to.