Perseuz:
I think than the function "limit" is equal to 2 because:IndicatorCounted() = Bars - 1 = counted_bars then,
The first time counted_bars == 0 so it loops from 1+1 to all a bars. After that counted_bars = Bars -1 so limit = 1 and nothing happens.
Do it right. ALWAYS count down to zero. FractRightBars does not belong in the main loop. It's in the sub loop.
The first time counted_bars == 0 so it loops from 1+1 to all a bars. After that counted_bars = Bars -1 so limit = 1 and nothing happens.
Do it right. ALWAYS count down to zero. FractRightBars does not belong in the main loop. It's in the sub loop.
Thanks for your response.
I agree with you in "The first time counted_bars == 0 so it loops from 1+1 to all a bars." But I don't understand what you say next.
In the second time, counted_Bars == Bars-1
In this second time, ¿which values are taken by the variable "i" in the loop?
for(i=1+FractRightBars; i<limit; i++) {
PD: Excuse mi english.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I'm studying this indicator but I don't understand some lines. Please someone who explain it to me. ¿Where is my error?
First the function "FractRightBars" is equal to 1.
I think than the function "limit" is equal to 2 because:
IndicatorCounted() = Bars - 1 = counted_bars then,
counted_bars-- = Bars - 2 then,
limit = Bars - (Bars - 2) = 2
Here is my problem in the loop of fractals,
The loop begin in i = 1+1 = 2,
with increments of one at a time until the condition i<limit = 2.
What am I doing wrong?
Thanks.