Forex



Go Back   Forex Trading > Discussion Areas > Setup Questions
Forex Forum Register More recent Blogs 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 07-29-2006, 05:38 PM
Junior Member
 
Join Date: Apr 2006
Posts: 5
FlatLine is on a distinguished road
Help getting the color of a an indidator.

I am able to get the value of my indicator using:

double MyLevel=iCustom(NULL,0,"MyIndicator",0,0); // The current level

But i also need the color. I need to know if it is red or green. I have searched through this site and i haven't seen any code that will retreive the color of the indicator.

I did find this in the documentation.

color oldColor=ObjectGet("hline12", OBJPROP_COLOR);

But I couldn't figure out how to get my inidcator in there instead of hline12.
BTW, my idicator is in the main window.

Any help would be appreciated.
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 07-29-2006, 06:35 PM
FX_Sniper's Avatar
Senior Member
 
Join Date: Jan 2006
Location: South Africa
Posts: 201
FX_Sniper is on a distinguished road
Why not use the same logic test that changes it's color in the main window in you indicator window ?
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 07-29-2006, 07:28 PM
Junior Member
 
Join Date: Apr 2006
Posts: 5
FlatLine is on a distinguished road
Because I've already done that and stored the value in the color. I con't want to roll through the history again and do the calculation each time I need to check the color.
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 07-29-2006, 08:36 PM
Junior Member
 
Join Date: Jun 2006
Posts: 23
DaytrSuccess is on a distinguished road
indicator color

Quote:
Originally Posted by FlatLine
I am able to get the value of my indicator using:

double MyLevel=iCustom(NULL,0,"MyIndicator",0,0); // The current level

But i also need the color. I need to know if it is red or green. I have searched through this site and i haven't seen any code that will retreive the color of the indicator.

I did find this in the documentation.

color oldColor=ObjectGet("hline12", OBJPROP_COLOR);

But I couldn't figure out how to get my inidcator in there instead of hline12.
BTW, my idicator is in the main window.

Any help would be appreciated.
Maybe this is to simple : old color = indicator_color

Forgive me if this is inapropirate (i am a newbie) but I recently used that to comment on the color of my indicator in the main window.

would be happy if this helps.
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 07-30-2006, 09:39 AM
FX_Sniper's Avatar
Senior Member
 
Join Date: Jan 2006
Location: South Africa
Posts: 201
FX_Sniper is on a distinguished road
Quote:
Originally Posted by FlatLine
Because I've already done that and stored the value in the color. I con't want to roll through the history again and do the calculation each time I need to check the color.
Hmmm, I recon you could be helped faster if you are more detailed about what EXACTLY it is you are trying to accomplish, it is difficult to lend a hand but first having to use trail-&-error to figure out what it is you want let alone how to fix it. So I am sure that if we receive more details, someone would be glad to help you out
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 07-30-2006, 10:59 AM
beerhunter's Avatar
Member
 
Join Date: Nov 2005
Posts: 43
beerhunter is on a distinguished road
I'm not sure you can do that for iCustom. Multi-color indicators usually have multiple buffers, one buffer for each color, so instead of looking for color value look for buffer value, i.e.:

buffer1 is green, buffer2 is red. Usually, they are not diplayed at he same time, say when there is an uptrend, green is displayed, when downtrend, red is displayed. That means, when green has a given value, red is 0 or -1 or novalue.

So, if buffer1 is positive and buffer2 is 0 (buffer1>0 && buffer2<=0), you know there is a green color displayed.
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
Stochastic Color Bar! turspedie Indicators - Metatrader 4 40 10-09-2009 02:47 PM
EMA in color european Indicators - Metatrader 4 10 01-31-2009 11:44 AM
color change swall Metatrader 4 2 10-26-2006 12:41 AM
Color Coded AMA? gabroo_munda Indicators - Metatrader 4 17 05-12-2006 05:42 PM


All times are GMT. The time now is 07:11 PM.



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