I am basing my indicator of the Ichimoku indicator and I need the values of Senkou Span A and Senkou Span B.
The problem is that the indicator works for all the bars on the chart, but I the Senkou Span A and B are ahead or shift 26 periods forward and I can get my indicator to draw past the Bars on the chart like the Ichimoku.
Can someone help me with this?
My confusion is this, the senkou Span A code is this
Since they both are going off of two different time periodes I dont know how to sync the data.
I used tried to use iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANA, -26) and iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANB, -26); to get values but it messes up the calculation on the chart.
if I use iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANA, 0) and iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANB, 0);
in my init () function it calculates and draws perfectly only for the bars on the chart. I need it to draw perfectly all the way up to 26 periods ahead like that actual Ichimoku indicator.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I am basing my indicator of the Ichimoku indicator and I need the values of Senkou Span A and Senkou Span B.
The problem is that the indicator works for all the bars on the chart, but I the Senkou Span A and B are ahead or shift 26 periods forward and I can get my indicator to draw past the Bars on the chart like the Ichimoku.
Can someone help me with this?
My confusion is this, the senkou Span A code is this
and senkou SpanB is
Since they both are going off of two different time periodes I dont know how to sync the data.
I used tried to use iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANA, -26) and iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANB, -26); to get values but it messes up the calculation on the chart.
if I use iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANA, 0) and iIchimoku(NULL, 0, 9, 26, 52, MODE_SENKOUSPANB, 0);
and use
in my init () function it calculates and draws perfectly only for the bars on the chart. I need it to draw perfectly all the way up to 26 periods ahead like that actual Ichimoku indicator.