MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Find How 300 000+ Users Liven Up MQL5.com

Heiken Ashi EA code

Back to topics list To post a new topic, please log in or register
avatar
85
11011980 2012.03.27 20:26
 

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.

 
A Non-Trading EA Testing Indicators
All indicators can be divided into two groups: static indicators, the displaying of which, once shown, always remains the same in history and does not change with new incoming quotes, and dynamic indicators that display their status for the current moment only and are fully redrawn when a new price comes. The efficiency of a static indicator is directly visible on the chart. But how can we check whether a dynamic indicator works ok? This is the question the article is devoted to.
avatar
Moderator
3854
ubzen 2012.03.28 01:52 #
 

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

 
avatar
85
11011980 2012.03.31 13:46 #
 
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.

 
avatar
1002
dabbler 2012.03.31 14:48 #
 
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 ...

http://forum.mql4.com/45675#572603




 
Back to topics list  

To add comments, please log in or register