Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-09-2006, 07:42 AM
Junior Member
 
Join Date: Sep 2006
Location: Sydney Australia
Posts: 15
shaker22a is on a distinguished road
Editing formula colors

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-09-2006, 08:42 AM
elihayun's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 350
elihayun is on a distinguished road
Quote:
Originally Posted by shaker22a
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
use this:
int myColor = C'0x46,0x46,0x46';
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-09-2006, 09:22 AM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 557
cja is on a distinguished road
Color codes

Quote:
Originally Posted by shaker22a
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
Here 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 custom and a new box appears the numbers in the right side list of red, green, blue are the numbers you can use in the code the variations are endless - have fun

cja
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-09-2006, 09:56 AM
Junior Member
 
Join Date: Sep 2006
Location: Sydney Australia
Posts: 15
shaker22a is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-09-2006, 10:19 AM
elihayun's Avatar
Senior Member
 
Join Date: Jan 2006
Posts: 350
elihayun is on a distinguished road
Quote:
Originally Posted by shaker22a
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
u 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);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-09-2006, 10:46 AM
Junior Member
 
Join Date: Sep 2006
Location: Sydney Australia
Posts: 15
shaker22a is on a distinguished road
works a charm many thnx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MACD With colors TheWicker Indicators - Metatrader 4 7 04-14-2007 03:54 PM
Change MetaEditor Colors barnix Metatrader 4 0 02-24-2007 11:24 AM
One Line different Colors forex_trader Indicators - Metatrader 4 1 07-11-2006 12:58 AM


All times are GMT. The time now is 07:49 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.