Newbie needs help getting EA to recognize a bar color - page 2

 

Hello,


i need help. How can i write a function to recognize a bar color change?


Thanks in advance.


H4m4nn

 
phy:

Do an iCustom() call to the indicator.

index 2 and 3 define the body.

if index2 > index3 then the color is blue. if index2 < index3 the color is red.

I might have the blue/red backwards.

You can figure out which is which by testing.

Thnx! a very much, Im facing the same problem also.

U save my time and work also.

Thnx! Again!

 

How about the obvious:

if (iClose(NULL,0,1)>iOpen(NULL,0,1)) { PervBarColor = Green; }

if (iClose(NULL,0,1)<iOpen(NULL,0,1)) { PervBarColor = Red; }

if (iClose(NULL,0,1)==iOpen(NULL,0,1)) { PervBarColor = Doji; }


Analizing the Heiken Ashi Smoothed I see that it is moving along a certain Moving Average.

Though a very useful indicator, it does not always show the actual Bar color.

For my EA I need the actual previous Bar color, or any other previous Bar color.

Hope to have helped some newbie seeker :-)

 
How does your code help determine the colour of the Heiken Ashi bars ? that is what this 4 year old (almost) thread is all about . . .
 
RaptorUK:
How does your code help determine the colour of the Heiken Ashi bars ? that is what this 4 year old (almost) thread is all about . . .


OK, you're right. Maybe I got it wrong, but I was searching for a solution to recognize the previous Bar color a while ago and I could only find this thread. Being a newbie as well, I took the advice and implemented the Heiken Ashi Smoothed. That helped, but not for every case. Then, a few days later I had an "enlightement" and thought this thread was a good place for a newbie to find this simple information.

And BTW, the thread title is "Newbie needs help getting EA to recognize a bar color" - says nothing about Heiken Ashi.

Thus, Googling for this brings the Googler here.

 
Dadas:


OK, you're right. Maybe I got it wrong, but I was searching for a solution to recognize the previous Bar color a while ago and I could only find this thread. Being a newbie as well, I took the advice and implemented the Heiken Ashi Smoothed. That helped, but not for every case. Then, a few days later I had an "enlightement" and thought this thread was a good place for a newbie to find this simple information.

And BTW, the thread title is "Newbie needs help getting EA to recognize a bar color" - says nothing about Heiken Ashi.

Thus, Googling for this brings the Googler here.

It helps if you read the content of the posts not just the titles of the tread . . .

"I need some help getting my EA to recognize an indicator's bar color"

 
RaptorUK:

It helps if you read the content of the posts not just the titles of the tread . . .

"I need some help getting my EA to recognize an indicator's bar color"


Google doesn't find that, it finds the title.

Still think my information can help someone.

There is no sense in further "ping-pong".

Doesn't add any value.

And I did read the whole thread.

 

hello dear I am very new for understand this program this can anyone tell me how does it work, I mean where I have to input this program and where I have to past it,, can any one tell me this or mail me adv.rased83@yahoo.com, if possible, please

 
adv.rased:

hello dear I am very new for understand this program this can anyone tell me how does it work, I mean where I have to input this program and where I have to past it,, can any one tell me this or mail me adv.rased83@yahoo.com, if possible, please

adv.rased I think you need to take a course in the MetaQuoteLanguage (MQL). This is the programming language for MT4 (MetaTrader).

Everything you need is here - look at the top menu bar -> Documentation, Book, TA, Code Base, Articles.

The road is preaty long, if you do not have any previous experience in programming, like PHP, for example.

Then, when you learn, you can write your own helping programms like scripts, indicators and Expert Advisors (EA).

 
Dadas:

adv.rased I think you need to take a course in the MetaQuoteLanguage (MQL). This is the programming language for MT4 (MetaTrader).

Everything you need is here - look at the top menu bar -> Documentation, Book, TA, Code Base, Articles.

The road is preaty long, if you do not have any previous experience in programming, like PHP, for example.

Then, when you learn, you can write your own helping programms like scripts, indicators and Expert Advisors (EA).

ok. thank you very much, but I have no experience in programing language, I can use other person's made indicator or else, isn't. thanks

Reason: