Forex
Google

Go Back   Forex Trading > Programming > Metatrader Programming
Forex Forum Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


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 01-29-2007, 03:39 AM
fxbs fxbs is offline
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 1,592
fxbs is on a distinguished road
How to set custom color in the indicator code?

How to set custom color in the indicator code?
Line “#property indicator_color“ does not allow any numbers…
Thank you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-29-2007, 04:45 AM
Diam0nd's Avatar
Diam0nd Diam0nd is offline
Senior Member
 
Join Date: Oct 2006
Posts: 235
Diam0nd is on a distinguished road
Quote:
Originally Posted by fxbs
How to set custom color in the indicator code?
Line “#property indicator_color“ does not allow any numbers…
Thank you.
Have you tried using words btw? Like Red, Blue, etc.



Cheers,
Diam0nd




I LOVE
__________________
- MetaTrader v4.00 Build 216 (16 Apr 2008)
- MetaTrader MultiTerminal v4.00 Build 213 (20 Mar 2008)
- Always use the latest (^ABOVE^) MetaQuotes products, saves a lot of nerves. What's new.
"METAQUOTES FOR LIFE!"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-29-2007, 05:59 AM
fxbs fxbs is offline
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 1,592
fxbs is on a distinguished road
[quote=Diam0nd]Have you tried using words btw? Like Red, Blue, etc.
Thank you for reply!
Sure,
I mean, in script, line "#property indicator_color" allows you put only basic web colors from the table set by words (red, white, blue, etc) and doesn't let you put any custom colors (shades of basic web colors) those are digits.
You can set any custom color through the terminal, but should be some trick to set it from the script and not to do it manually all the time...(lazy)

Diamond, Should be some easy hack, i believe in you!

Last edited by fxbs : 01-29-2007 at 06:08 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-29-2007, 06:00 AM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 515
cja is on a distinguished road
color

Quote:
Originally Posted by fxbs
How to set custom color in the indicator code?
Line “#property indicator_color“ does not allow any numbers…
Thank you.
you need to use an - extern color (color name)=C'109,44.44';

This will give you unlimited color variants, just get the numbers for the colors off the custom color part of the pop up box showing the standard colors, the numbers on the right side are the ones you want. hope this helps

cja
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-29-2007, 06:16 AM
fxbs fxbs is offline
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 1,592
fxbs is on a distinguished road
Hi, CJA! when you (I'm) putting digits in the line and start compiling in Metaeditor, it shows error: "defined value expected" dem...

Last edited by fxbs : 01-29-2007 at 06:27 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-29-2007, 10:00 AM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 515
cja is on a distinguished road
Color

Quote:
Originally Posted by fxbs
Hi, CJA! when you (I'm) putting digits in the line and start compiling in Metaeditor, it shows error: "defined value expected" dem...
You need to have a reference to the color name in the line of code. Look at the supplied screenshot, notice where i have changed the code, actually i have also changed the line color to red. The altered code is the next line just below the 2 gray lines of code //SetIndexStyle etc

Image1.gif
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-29-2007, 02:45 PM
fxbs fxbs is offline
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 1,592
fxbs is on a distinguished road
Cool!

Thank you, CIA, wonderful!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-30-2007, 09:49 PM
fxbs fxbs is offline
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 1,592
fxbs is on a distinguished road
plus another method: to add cust.color code (4xmpl C'183,0,0') to "SetIndexStyle" line:

SetIndexStyle(0,DRAW_LINE,0,2,C'183,0,0');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MACD color indicator droesparky Indicators - Metatrader 4 5 03-10-2007 02:10 AM
Help: Indicator color change asam Indicators - Metatrader 4 2 10-24-2006 01:23 AM
2 LSMA-color indicator... ttt123 Metatrader 4 2 09-18-2006 08:33 AM


All times are GMT. The time now is 09:25 AM.