Fibo + ZigZag
-
Hello everyone.
I wonder how can i define Fibo for BUY(low to high) and SELL(high to low) based on ZigZag while the it always have H0 and L0 at the same time? -
@pheaktra-capo How to fine current leg? (L0 or H0)?
-
@pheaktra-capo ZigZag only has a value when the line makes a corner. All other candles have value of 0. So to find a corner, make a loop that checks all candles backward in time as long as needed to get a non-zero indicator value. Then you can find out if its an up or down corner using the secondary buffers.
-
@roar Hello.
You mean check back xCandle to make sure the current price is higher than LO or lower than H0 right?
Please share me example project . . . . -
@pheaktra-capo check back to find a non-zero value of the indicator itself. I dont have any example project
-
@roar ok let me try. Thank you very much
-
@pheaktra-capo this what i have done. But it work not correct.
Please help check and adjust it -
@roar his what i have done. But it work not correct.
Please help check and adjust it -
@pheaktra-capo you keep increasing a candle ID in a loop, but you dont use that ID in the indicator.

-
@roar ohhhh yeah i see let me check again
-
@roar it is still dont work.
I want to ask other thing. How can i capture price of some moment and use it in the future?
EX: now 8:00am, highest value of Candle[1 to 20] is 1.12000.
Some moment later, few day maybe, highest value of Candle[1 to 20] is 1.13000. How can i get that value 1.12000 in the past to work now? -
@pheaktra-capo get value of candle[6 to 20] or something... Why do you need exactly that value and not the new high?
-
@roar

As you can see, Condition is if:
Candle[2]&[3] < Mid line(yellow) && Candle[1] X> Mid line(yellow) ==>> Buy Now
As the moment of candle[2]and[3] was above Mid Line. But for current situation, the price of candle[2]&[3] was stay below Mid line(yellow) and it trigger the condition.
You can see it is not correct what i want. -
-
@pheaktra-capo just use the "candle id" setting in your condition block
-
@roar Yes i did. But as time goes by, value of candle[2]&[3] become lower than current value of Yellow line
-
@pheaktra-capo you can save the datetime value if needed, but why do you need to come back checking those candles in the future?
Why doesnt it work simply like this https://fxdreema.com/shared/7nj8NulMd
-
@roar

This is the correct one.
CandleClose[2]&[3] < Yellow && CandleClose[1] X> Yellow == Buy Now.
But the last picture above, it is something not correctIt was:
CandleClose[2]&[3] > Yellow
But after few Candle later, it was count as bellow Yellow Line -
@pheaktra-capo you can compare last candles to last values of the yellow line, or
compare last candles to current value of the yellow line, or
compare current candle to last values of the yellow line.Just use the candle ID.
