Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Ichimoku Kinko Hyo2 - MetaTrader 4 Script - MT4/MT5 Resources

author blogger | 851 reads | 0 comments |

Ichimoku Kinko Hyo2 - indicator for MetaTrader 4

Ichimoku Kinko Hyo2 - indicator for MetaTrader 4

Ichimoku Kinko Hyo2 - indicator for MetaTrader 4

Ichimoku Kinko Hyo2 - indicator for MetaTrader 4

Say hello to everyone. This is my rendition of the Ichimoku Kinko Hyo indicator version 2. Mainly rebuilt to accommodate expert advisors trading multiple currencies simultaneously, it can still be used by manual traders or single currency expert advisors just like the original version.

Usage (updated on June 7, 2020):

 Double tenkan, kijun, chikou, spa, spb; // They are created empty, but they will contain the requested data for 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,a magic number , 1 );//new
// "" represents the current symbol, but you can specify a symbol, such as "EUR/USD".
// 0 means the current chart, but you can specify the chart period, for example 240.
// 3 is the period used to calculate kumo's implied volatility. //The tenkan variable now contains the indicator value for the specified shift, which is 1.
//The kijun variable now contains the index value when shifted, which is 1.
//The chikou variable now contains the index value when shifted, which is 1.
//The spa variable now contains the index value at the time of shift, which is 1.
//The spb variable now contains the index value at the time of shift, which is 1.
//The kiv1 variable now contains the kumo implied volatility at the time of transition, which is 1. //kshape variable now contains description of kumo shape: flat top/flat bottom. //ksentiment variable now contains description of kumo sentiment: bullish/bearish.  

Variables such as kijun, chikou... also contain their respective values ​​at the specified shift. Remember to add " #include Before using this feature, please add " at the top of your EA.

The original mql4 ichimoku indicator worked fine, and it will continue to do so for most of us. I think it's primarily built for manual traders. Another situation I encountered when rebuilding is that any problems or inefficiencies are magnified when used for multiple currencies at the same time. To solve this problem, I modified the indicator to run only when necessary, i.e. only when a new bar is completed. The original version runs every clock cycle, which I think consumes unnecessary CPU cycles.

When one reads the Ichimoku literature, one often encounters references to clouds as "fat," "thick," or "thin." It is easy for an experienced Ichimoku practitioner to describe clouds as "fat" or "thin" because she knows what the typical thickness of a pair of clouds is. For beginners like me, describing the cloud is very difficult because we don't know how to objectively compare it to what. I think the way to go about this is to compare the cloud to itself over a specific period of time. This is where the " getKumoRelativeSize() " function is written.

Ichimoku Kinko Hyo2 - indicator for MetaTrader 4

(See new usage below)


Attachment download

📎 breakpoint.mqh (9.69 KB)

📎multipairsfunctions.mqh (4.85 KB)

📎 io_arrays.mqh (14.02 KB)

📎 ichimoku2_kinko_hyo_indicator.mqh (3.86 KB)

📎ichimoku2.mq4 (25.5 KB)

Source: MQL5 #27467

Refresh