Adam Woodcock:
Hi I'm learning to code custom indicators, I am trying to do one for Ichimoku where the indicator must meet a checklist of 4 items:
1) TK Cross
2) Price relative to cloud
3) Favourable cloud (bullish/bearish)
4) Lag span above cloud
I have the following code with no errors however critical Array out of Range errors upon running:
If anyone could help me out I'd greatly appreciate it.
Thanks in advance,
Adam
if(prev_calculated==0) first=Senkou_B+1; else first=prev_calculated+1; CopyBuffer(ichihandle,0,0,Senkou_B+1,TenkanArray); ArraySetAsSeries(TenkanArray,true); ... for(bar = first; bar >=0; bar--)
Your are copying "Senkou_B+1" values, which are indexed from 0 tp Senkou_B, that's your range.
But your are using an index "bar" starting from limit which is initalized to Senkou_B1+1 or prev_calculated+1 => out of range.
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
Hi I'm learning to code custom indicators, I am trying to do one for Ichimoku where the indicator must meet a checklist of 4 items:
1) TK Cross
2) Price relative to cloud
3) Favourable cloud (bullish/bearish)
4) Lag span above cloud
I have the following code with no errors however critical Array out of Range errors upon running:
If anyone could help me out I'd greatly appreciate it.
Thanks in advance,
Adam