Hi
i was looking at some indicator formulas and was wondering if anyone can help me change some color to a custom color. for example
ObjectSet("H4 line", OBJPROP_COLOR, DimGray)
the above is pretty straight forward if i want line to be black u just change dimgray to black, but how about if i want a custom color such as #464646 how to u do this?
Thnx in advanceuse this:
int myColor = C'0x46,0x46,0x46';
Color codes
Hi
i was looking at some indicator formulas and was wondering if anyone can help me change some color to a custom color. for example
ObjectSet("H4 line", OBJPROP_COLOR, DimGray)
the above is pretty straight forward if i want line to be black u just change dimgray to black, but how about if i want a custom color such as #464646 how to u do this?
Thnx in advanceHere is the sort of code for color you are talking about
extern color CURRDAYColor = C'80,0,46' ;
go into a standard indicator and click on a color to alter it to another shade and a pop up box appears with all the standard colors go down to the bottom of the box and click on customand a new box appears the numbers in the right side list of red, green, blueare the numbers you can use in the code the variations are endless - have fun
cja
thnx this is what i want...
i am not much of a programmer so not sure where to put the code
in the bottom example
ObjectSet("H4 line", OBJPROP_COLOR, DimGray);
do i change the following only, OBJPROP_COLOR, DimGray to
extern color CURRDAYColor = C'46,46,46' ;
thnx in advance
thnx this is what i want...
i am not much of a programmer so not sure where to put the code
in the bottom example
ObjectSet("H4 line", OBJPROP_COLOR, DimGray);
do i change the following only, OBJPROP_COLOR, DimGray to
extern color CURRDAYColor = C'46,46,46' ;
thnx in advanceu can do this
ObjectSet("H4 line", OBJPROP_COLOR, C'0x46,0x46,0x46);
or before the ObjecSet line insert this line
int myColor = C'0x46,0x46,0x46;
and use it like this: ObjectSet("H4 line", OBJPROP_COLOR, myColor);
works a charm many thnx

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
i was looking at some indicator formulas and was wondering if anyone can help me change some color to a custom color. for example
ObjectSet("H4 line", OBJPROP_COLOR, DimGray)
the above is pretty straight forward if i want line to be black u just change dimgray to black, but how about if i want a custom color such as #464646 how to u do this?
Thnx in advance