make an extern input for it and put in SetIndexStyle ? write the code and show us coz that is a simple task.
It's called stupid if you're not asking for help when you have no idea what you are doing :).
Hello,
I have a *really* stupid question I am really sorry to bother you with: My metatrader4 templates always forget the colors I had set for certain indicator buffers. Why?
The code in those indicators are as follows. Is there a way to set the code to make the template actually remember that as a parameter? Thank you! :-)
Are you saving your template after changing the settings for the Indicator ?
make an extern input for it and put in SetIndexStyle ? write the code and show us coz that is a simple task.
It's called stupid if you're not asking for help when you have no idea what you are doing :).
Hi, thanks for answering :-) Do you mean the following?
//... #property indicator_separate_window #property indicator_buffers 3 #property indicator_color1 DodgerBlue #property indicator_color2 Red #property indicator_color3 Teal #property indicator_width1 2 #property indicator_width2 2 #property indicator_width3 1 //... //+------------------------------------------------------------------+ //| Custom indicator initialization function | //|------------------------------------------------------------------| int init() { // Total buffers IndicatorBuffers(5); // Visible buffers SetIndexStyle(0,DRAW_HISTOGRAM, 0, indicator_width1, indicator_color1); SetIndexBuffer(0, FextMapBuffer1); SetIndexStyle(1,DRAW_HISTOGRAM, 0, indicator_width2, indicator_color2); SetIndexBuffer(1, FextMapBuffer2); SetIndexStyle(3,DRAW_LINE, 0, indicator_width3, indicator_color3); SetIndexBuffer(2,FextMapBuffer3); // Internal SetIndexBuffer(3,FextMapBuffer4); SetIndexBuffer(4,FextMapBuffer5); return(0); }
Every time the indicator loads, the compiled settings override the template settings. I guess it's something wrong in my code! And if I use the following the default color for all buffers is BLACK.
extern color indicator_color1 = Teal;
Hi, thanks for answering :-) Do you mean the following?
Every time the indicator loads, the compiled settings override the template settings. I guess it's something wrong in my code!
Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo !!!.
:)
extern color My_Cool = Aqua ;
and put it in ..., you know where :),
That's property, I was asking for extern input, which is external input from user.
Noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo !!!.
:)
and put it in ..., you know where :),
If I do that, default color is black for all buffers :/
Oh my, indicator_color1 is reserved. Ok ok ok ok, I got it. Thanks!
I told you it was a stupid question :P
If I do that, default color is black for all buffers :/
Just try it again, would you please :).
Ah, I just remember this : in MetaEditor, there is Heikin Ashi (HA), that is good example for you to copy. attach it to the chart and open its property to change the color from user extern input tab not from color tab, then save it as template. Attach the template to another chart and you will see that the HA has different color that the original one. Open it's property tab, click reset button will change the extern input back to the original one.
OMG I'm replying myself.
Ah, I just remember this : in MetaEditor, there is Heikin Ashi (HA), that is good example for you to copy. attach it to the chart and open its property to change the color from user extern input tab not from color tab, then save it as template. Attach the template to another chart and you will see that the HA has different color that the original one. Open it's property tab, click reset button will change the extern input back to the original one.
OMG I'm replying myself.
I told you it was a stupid question :P
My apology for writing "No" that long, I hope you don't get the wrong idea, ... and it's not stupid question like I've told you before.
I suspect the template isn't being saved after the Indicator colours are being changed
That could be possible case, however in my case, sometime I don't get that color back on chart so I have to write them as extern input.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have a *really* stupid question I am really sorry to bother you with: My metatrader4 templates always forget the colors I had set for certain indicator buffers. Why?
The code in those indicators are as follows. Is there a way to set the code to make the template actually remember that as a parameter? Thank you! :-)
#property indicator_color1 <Whateverhere>