int i=Bars-counted_bars-1; while(i>=0) { double LowAddition= 30*Point; double HiAddition = iHigh(Symbol(),TimeFrame1,i)+ (30*Point); //======================================================================== //time frame eval TimeFrameRef=iTime(Symbol(),TimeFrame1,i); BarShift=iBarShift(Symbol(),TimeFrame2,TimeFrameRef);The i and while(i) are the chart's bar index. HiAddition is bogus if TimeFrame1 != Period(). TimeFrameRef is bogus if TimeFrame1 != Period(), and BarShift will be.
int i=Bars-counted_bars-1; while(i>=0) { int iTF1 = iBarShift(Symbol(),TimeFrame1,Time[i]), iTF2 = iBarShift(Symbol(),TimeFrame2,Time[i]); double LowAddition= 30*Point; double HiAddition = iHigh(Symbol(),TimeFrame1,iTF1)+ (30*Point); //======================================================================== //time frame eval //TimeFrameRef=iTime(Symbol(),TimeFrame1,i); //Use iTF2 BarShift=iBarShift(Symbol(),TimeFrame2,TimeFrameRef);
WHRoeder:
The i and while(i) are the chart's bar index. HiAddition is bogus if TimeFrame1 != Period(). TimeFrameRef is bogus if TimeFrame1 != Period(), and BarShift will be.
What you write makes sense. Thank you. My other problems I believe are centered around my lack of understanding of IndicatorCounted, counted_bars etc. I will research further to see what I can find.
BTW .. I have searced for an understandable explanation for (SetIndexStyle(0,DRAW_ARROW,EMPTY);) What does EMPTY do? If I remove it, I get the same results.
Again thank you for the time you have spent .... it has been very helpful..
What you write makes sense. Thank you. My other problems I believe are centered around my lack of understanding of IndicatorCounted, counted_bars etc. I will research further to see what I can find.
BTW .. I have searced for an understandable explanation for (SetIndexStyle(0,DRAW_ARROW,EMPTY);) What does EMPTY do? If I remove it, I get the same results.
Again thank you for the time you have spent .... it has been very helpful..
EMPTY value means that the style will not be changed.
I don't know how I missed that. I am very sorry to have bothered you. Thank you very much.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use