I wrote a few days ago about an indicator i was working to show several TF bollinger bands on the chart of the least selected time frame. I fixed the issue for data retrieving, but there is something else - the information when put into buffers is wrongly outputted.
I printed every value of the BB(for every TF), but for some unknown for me reason, what comes on chart is completely wrong.
BB_M5 = iBands(_Symbol,PERIOD_M5,BBperiodM5,0,BBdevM5,BBpriceM5);
BB_M15 = iBands(_Symbol,PERIOD_M15,BBperiodM15,0,BBdevM15,BBpriceM15);
BB_H1 = iBands(_Symbol,PERIOD_H1,BBperiodH1,0,BBdevH1,BBpriceH1);
BB_D1 = iBands(_Symbol,PERIOD_D1,BBperiodD1,0,BBdevD1,BBpriceD1);
this is how i get my handles,
double bbM5(int mode,int shift)
//Print("Can not copy BB M5 shift ",shift," ",GetLastError());
this is how i pick the data for the selected index, i tested this with the normal BB, it works.
for(int i=0; i<rates_total; i++)
datetime time = iTime(_Symbol,0,i);
int m5time = iBarShift(_Symbol,PERIOD_M5,time);
bbm5[i] = bbM5(0,m5time);
but when i test with something like to code above, the result is unexplicable for me.
I tested several variations of the loop, it worked the same way, except when i loop from 0 to rates_total, the value does not reset the next iteration. This is some other issue im experiencing, but i suppose its connected.
Well, I really hope this can be fixed, thank you for the time
Best Regards Everyone
Hi please see here.
And also read this.
wait, what ? It worked. Hmm , i tried it,but it did not work before.
Thanks for the help Marco