Forex



Go Back   Forex Trading > Programming > MetaTrader
Forex Forum Register More recent Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 01-29-2007, 04:39 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 01-29-2007, 05:45 AM
Diam0nd's Avatar
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 225 (10 Jul 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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 01-29-2007, 06:59 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
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 07:08 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 01-29-2007, 07:00 AM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 676
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 01-29-2007, 07:16 AM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
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 07:27 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 01-29-2007, 11:00 AM
cja's Avatar
cja cja is offline
Senior Member
 
Join Date: Apr 2006
Posts: 676
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 01-29-2007, 03:45 PM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 01-30-2007, 10:49 PM
Senior Member
 
Join Date: Jan 2007
Location: not so remote
Posts: 3,272
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!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 color indicator droesparky Indicators - Metatrader 4 7 02-22-2009 03:05 AM
Help: Indicator color change asam Indicators - Metatrader 4 2 10-24-2006 02:23 AM
2 LSMA-color indicator... ttt123 Metatrader 4 2 09-18-2006 09:33 AM


All times are GMT. The time now is 06:16 PM.



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