|
|||||||
| 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 |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
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. |
|
|||
|
indicator color
Quote:
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. |
|
||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stochastic Color Bar! | turspedie | Indicators - Metatrader 4 | 37 | 03-08-2008 03:00 PM |
| color change | swall | Metatrader 4 | 2 | 10-25-2006 11:41 PM |
| EMA in color | european | Indicators - Metatrader 4 | 9 | 09-18-2006 06:54 PM |
| Color Coded AMA? | gabroo_munda | Indicators - Metatrader 4 | 17 | 05-12-2006 04:42 PM |