Forex Forums | ForexLasers.com


Go Back   Forex Lasers Forum > METATRADER FORUM > General MT4 / MT5 discussion
Home Forex Education Economic Calendar Register Search


Color of bar?

General MT4 / MT5 discussion


Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old 01-06-2009, 13:08
Level II Lasers Member
 
Join Date: May 2009
Location: Singapore
Posts: 39
Default Color of bar?

Hi guys,

I am new to forex. I am into programming since my teenage days. When I went through the awesome indicator, i manage to get the value of the period, but how do I obtain the colour of the bar of the awesome indicator. ie Green or Red.

Thanks in advance to anyone who can help.
Reply With Quote
  #2  
Old 02-06-2009, 07:51
Level II Lasers Member
 
Join Date: Feb 2009
Posts: 27
Default

Quote:
Originally Posted by lianwk View Post
Hi guys,

I am new to forex. I am into programming since my teenage days. When I went through the awesome indicator, i manage to get the value of the period, but how do I obtain the colour of the bar of the awesome indicator. ie Green or Red.

Thanks in advance to anyone who can help.
Right click over the indicator (assuming it's already attached to a chart) and call up its properties. There'll be a tab for colours - you can edit them there.
Reply With Quote
  #3  
Old 02-06-2009, 10:32
Level II Lasers Member
 
Join Date: May 2009
Location: Singapore
Posts: 39
Default

Thanks to Jezzer1961.

I think I did not phrase my question properly. I need to know during the programming of an EA or indicator with the use of an awesome indicator, how do I in the programming process knows the colour of the bar?

The function iAO returns a double which is the height of the awesome bar.

Thanks.
Reply With Quote
  #4  
Old 02-06-2009, 12:10
Level II Lasers Member
 
Join Date: Feb 2009
Posts: 27
Default

Quote:
Originally Posted by lianwk View Post
Thanks to Jezzer1961.

I think I did not phrase my question properly. I need to know during the programming of an EA or indicator with the use of an awesome indicator, how do I in the programming process knows the colour of the bar?

The function iAO returns a double which is the height of the awesome bar.

Thanks.
I see. Sorry for the confusion.

You are correct, iAO does return a double for just a single buffer. The only variable which you can use within an EA is the bar shift.

If you were using it within an EA, you would perhaps compare the value returned for one shift against the value returned for another shift. For instance, your entry condition might be:

if(iAO(Symbol(),0,1)>iAO(Symbol(),0,2)) {Do this};

If you want the Awesome Oscillator source code, here is the link:

MQL4 Codebase - Awesome Oscillator
Reply With Quote
  #5  
Old 02-06-2009, 12:51
Level II Lasers Member
 
Join Date: May 2009
Location: Singapore
Posts: 39
Default

Thanks alot Jezzer1961. You are a great help.

Thanks.
Reply With Quote
Reply


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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 17:22.


Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.