Calling the Kumo Cloud on the iIchimoku indicator function.

 

I am developing an Ichimoku based EA with the following rules as per attached diagram

Buy Rules

  • Rule 1: Chikou Span should be above Kumo Cloud
  • Rule 2: Price close should be above Kumo Cloud
  • Rule 3: Tenkan-Sen should be above Kijun_sen
  • Rule 4: Future Kumo cloud should be bullish;

The challenge I am having is on which shifts I should use when calling Senkou Span A and B functions of the Kumo Cloud e.g. what will be the Senkou Span A and B shift values be at Rule 1 and 2?

 

Work with an easier case: an iMA indicator with a horizontal offset: 

Creating an iMA indicator handle, getting indicator values

iMA Values on a Chart

Pic. 1. Get value on bar #0, #1, #2

How to start with MQL5
How to start with MQL5
  • 2020.03.05
  • www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
 
I can work with other simple indicators. The challenge I am facing with Ichimoku is that the Kumo Cloud is projected 26 periods in the future whilst the Chokou Span if 26 periods in the past.
 
tchikwetu:

I am developing an Ichimoku based EA with the following rules as per attached diagram

Buy Rules

  • Rule 1: Chikou Span should be above Kumo Cloud
  • Rule 2: Price close should be above Kumo Cloud
  • Rule 3: Tenkan-Sen should be above Kijun_sen
  • Rule 4: Future Kumo cloud should be bullish;

The challenge I am having is on which shifts I should use when calling Senkou Span A and B functions of the Kumo Cloud e.g. what will be the Senkou Span A and B shift values be at Rule 1 and 2?

Well I guess you could just take the latest buffer available from the senkou 

 
Finally figured it out
 
tchikwetu #:
Finally figured it out
Hi, can you please explain how you figured this problem out?

I am also trying to use SSA and SSB 26 periods in the future. Not the value under price. 
Reason: