this is a way to use MA in our code. but how can we change the style of line in the code?
I want two MOVING AVERAGE indicatror showed in page with two different color.
something like this, with-ought using Chart Templates.
something like this, withought using chart Templet.
What is a templet?
You get a handle to be able to access the MA values. Nothing is shown on the chart. You can't change line style/colour with the handle.
Sorry, Chart Templates is correct.
seems I have same problem.
Still no way to do it.
Create another copy of the same indicator just with a different color and call them both.
Or copy the buffers and redraw them, you can use a different color for each candle.
Or create the indicator with 20 buffers that have the same data just a different color and only use the one with the desired color.
There are so many ways to accomplish something why do you say
I temporarily solved the problem.
Copied MA.MQL5 into MA_RED.MQL5 And MA_BLUE.MQL5 I changed the color in the source of them and using handles using ICustom.
I know it is not a processional solution, but it solved my problem.
Will be happy to see your solutions too.
MA_Red_Handle =iCustom(NULL,PERIOD_M1,"Ma_Red" ,MovingRedPeriod ,0,MODE_SMA,PRICE_CLOSE);
Thanks. I found one of them. Your comment appriciated.
thanks so much.
You now have 2 MA indicators :)