Mastering the Ichimoku Kinko Hyo 2 Indicator for MetaTrader 4

Mike 2019.12.27 12:29 29 0 0
Attachments

Hello, fellow traders! Today, I'm excited to share my take on the Ichimoku Kinko Hyo Indicator, now in its second version. This revamped version is specifically designed to cater to those of us using expert advisors (EAs) who trade multiple currencies at once. However, manual traders and those focused on single currency pairs will find it just as useful as the original.

Getting Started (Updated 7.6.2020):

double tenkan,kijun,chikou,spa,spb;// These variables will hold the requested data at the specified shift.
string kiv1;
string kshape,ksentiment;

int aMagicNumber=1234;

//iIchimoku2("",0,3,tenkan,kijun,chikou,spa,spb,kiv1,kshape,ksentiment,1);//OLD usage
iIchimoku2("",0,3,tenkan,kijun,chikou,spa,spb,kiv1,kshape,ksentiment,aMagicNumber,1);//NEW

//"" indicates the current symbol, but you can specify a symbol like 'EURUSD'.
// 0 means the current chart, but you can specify a chart period like 240.
// 3 is the period used for calculating kumo implied volatility.
// The tenkan variable now holds the indicator value at the specified shift, which is 1.
// The kijun variable now holds the indicator value at shift 1.
// The chikou variable now holds the indicator value at shift 1.
// The spa variable now holds the indicator value at shift 1.
// The spb variable now holds the indicator value at shift 1.
// The kiv1 variable now holds the kumo implied volatility at shift 1.  
// The kshape variable now describes the kumo's shape: flatop/flatbottom.
// The ksentiment variable now describes the kumo's sentiment: bullish/bearish.                                                                                                        

Don't forget to add #include <Ichimoku2_Kinko_Hyo_Indicator.mqh> at the top of your EA before using this function.


Why the Update?

The original MQL4 Ichimoku indicator was effective, and it continues to serve many of us well. However, it appeared to be designed with manual traders in mind. One challenge I encountered while updating the indicator was that any inefficiencies would become more pronounced when trading multiple currencies simultaneously. To tackle this, I modified the indicator to run only when necessary—specifically, after a new bar is completed. The original version ran on every tick, which I believe wasted CPU resources.

In the world of Ichimoku, you'll often hear terms like "fat," "thick," or "thin" when describing the Kumo. For seasoned Ichimoku traders, it's straightforward to label a kumo as "fat" or "thin" based on their experience with a pair's typical kumo thickness. But for beginners, like many of us, it's tough to make these comparisons. That's why I developed the GetKumoRelativeSize() function—to help us gauge the kumo relative to itself over a specific period.

Ichimoku Kinko Hyo2

(Check out the updated usage below)

Happy trading!


    List
    Comments 0