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, 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.
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.
- 2015.01.07
- www.mql5.com
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
Still no way to do it.
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_Blue_Handle =iCustom(NULL,PERIOD_M1,"MA_Blue",MovingBluePeriod,0,MODE_SMA,PRICE_CLOSE); MA_Red_Handle =iCustom(NULL,PERIOD_M1,"Ma_Red" ,MovingRedPeriod ,0,MODE_SMA,PRICE_CLOSE);
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
Thanks. I found one of them. Your comment appriciated.
thanks so much.
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.
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.
You now have 2 MA indicators :)
Congratulations
without change it in separate files
is matetrader5 opensource to see what fucn call indicator ?
Perhaps you should read the manual.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Drop the property and call the function Custom Indicators → PlotIndexSetInteger → ENUM_PLOT_PROPERTY_INTEGER → PLOT_LINE_COLOR
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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.