UPDATE
It is executing in the past, somehow it is getting that the price is always over Ichimoku cloud in the weekly chart so it returns "80", i have no idea why since that is not true.
Sadly you cannot access the history of a higher timeframe from a lower
-BB-
- BarrowBoy:news to me.
Sadly you cannot access the history of a higher timeframe from a lower -BB- double spanA=iIchimoku(NULL,getSupPeriod(Period()),9,26,52,MODE_SENKOUSPANA,i);
i is the shift for the current timeframe but your asking for the Ichimoku of a different one. You need the shift for that timeframe.int sp = getSupPeriod(Period()); for (i=Bars-Counted_bars-1; i>=0; i--){ int spi= iBarShift(NULL, sp, Time[i]); double spanA=iIchimoku(NULL,sp,9,26,52,MODE_SENKOUSPANA,spi); ... //i--; // Calculating index of the next bar }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello:
Below you have my start function. The problem I am having with this Custom Indicator is that It apparently doesnt process in all the chart´s bars, but only in some bars before the present.
It just tries to know if price is above, below or inbetween ichimoku cloud. If it is below it returns 20, above: 80, inbetween: 50.
(it does perfectly in the current bar, but a about 1 year before (daily chart) to the back it returns the value "80".
thanks in advance