Heiken Ashi EA code

 

Hi all,

i need help on how to generate signals for my EA from Heiken Ashi indicator,

i need the instruction that will give the value of the Heiken candle in both the upward direction and downward direction.

any help will be highly appreciated.

 

You need to check the buffers values to get a feel for what they look like. Example below, you can see they're similar to price. The trick is trying to figure out how it calculates the trends. For that and other uses, I recommend you check out this site.

void start(){
    double Buffer0=iCustom(Symbol(),0,"Heiken Ashi2",0,0);
    double Buffer1=iCustom(Symbol(),0,"Heiken Ashi2",1,0);
    double Buffer2=iCustom(Symbol(),0,"Heiken Ashi2",2,0);
    double Buffer3=iCustom(Symbol(),0,"Heiken Ashi2",3,0);
    Print("Buffer0="+Buffer0);
    Print("Buffer1="+Buffer1);
    Print("Buffer2="+Buffer2);
    Print("Buffer3="+Buffer3);
}
18:38:32 Test: loaded successfully
18:38:37 Test test started
18:38:37 2011.01.02 23:00  Heiken Ashi2 EURUSD,M1: loaded successfully
18:38:37 2011.01.02 23:00  Test EURUSD,M1: Buffer0=1.33689386
18:38:37 2011.01.02 23:00  Test EURUSD,M1: Buffer1=1.33440000
18:38:37 2011.01.02 23:00  Test EURUSD,M1: Buffer2=1.33689386
18:38:37 2011.01.02 23:00  Test EURUSD,M1: Buffer3=1.33440000
18:39:06 2011.01.02 23:00  Test EURUSD,M1: Buffer0=1.33689386
18:39:06 2011.01.02 23:00  Test EURUSD,M1: Buffer1=1.33440000
18:39:06 2011.01.02 23:00  Test EURUSD,M1: Buffer2=1.33689386
18:39:06 2011.01.02 23:00  Test EURUSD,M1: Buffer3=1.33445000
18:39:06 2011.01.02 23:00  Test EURUSD,M1: Buffer0=1.33689386
18:39:06 2011.01.02 23:00  Test EURUSD,M1: Buffer1=1.33420000
18:39:06 2011.01.02 23:00  Test EURUSD,M1: Buffer2=1.33689386
18:39:06 2011.01.02 23:00  Test EURUSD,M1: Buffer3=1.33432500
18:39:24 2011.01.02 23:00  Heiken Ashi2 EURUSD,M1: removed
 
ubzen:

You need to check the buffers values to get a feel for what they look like. Example below, you can see they're similar to price. The trick is trying to figure out how it calculates the trends. For that and other uses, I recommend you check out this site.


thanks for your helpful reply,

but i want to know which of the doubles above represents the Open of the Heiken Ashi candle,and the one that represents the Close.

expecting your response, thanks in advance.

 
11011980:

Hi all,

i need help on how to generate signals for my EA from Heiken Ashi indicator,

i need the instruction that will give the value of the Heiken candle in both the upward direction and downward direction.

any help will be highly appreciated.

The "difficulty" with the Heiken Ashi is that there is not just one standard version. If you take a look at this thread it should get you started ...

https://www.mql5.com/en/forum/137516

 
Hello to all
I just started programming with MQL4, and I want to write an expert based on the heiken ashi, but I do not know how to make the color of the heiken in the program?
 
There are no colors in code.
          take candle color hekin ashi - MQL4 and MetaTrader 4 #8-10 or #1 (2018)
Reason: