Take the value of the last fractal
-
Hi, I want to take the value of the last fractal but I don't know how to do it.
Thanks -
Firstly you create two variables. One for fractals up and another one for fractals down:

Then you catch them here:

Don't forget to spacify candle ID 2 as per the screenshot. Fractals are vever formed on candle ID 0 and 1.
-
@l-andorrà Hi,
You answer is useful but i need more. for example: I can catch last fractal value,ok, but after next candle value become zero again. i can not buffer that fractal value. I want to use last (old fractal, more than 3 candles) frctal value later. Also is it possible to buffer 1.lastfractal, 2.lastfractal..etc...
best regards. -
Sure, you can storage as many fractals as you wish. You just need as many different variables as fractal values. Then catch them as per my example, BUT not reset them. In my example, fractal values are automatically reset because they are exposed to the current price evolution. Simply move the value of the current fractal to another variable and do not reset it. You can use the same 'Modify Variables' block to do it.
-
@l-andorrà thanks, i worked but i think mine is too long or may be wrong method. Could you check it? is there any elegant method? comment screen is not seems good.
https://fxdreema.com/shared/zzUfOzOGb
but as a result, i achived to buffer last fractal but i can not imagine that how can i buffer last 2. or 3. fractal? regards.
-
Your current structure is perfect to store the most recent fractals. What you need now is creating two additional variables to store those values for future uses. Let's name them pastfup and pastfdown, for example. Then you strore the values of fup and fdown on blocks 4 and 9 respectively. That way you'll be able to work on fup and pastup on other blocks and they will update automatically as new fractals appear.
On the other habd, I strongly recommend you to put a 'Once per bar' block on top of your structure. You don't need to check all those values every single tick as is the case right now.
-
@l-andorrà thanks a lot. I will re-try asap.
regards. -
You're welcome.
-
@turelforex hi! How can I use pending order instead of massage?
-
What do you exactly mean?