FRACTALS DEFINITION
-
@mmaarits Wrong link, sorry. It's is empty!

-
@l-andorrà No, it is not a wrong link
I have not implemented it yet, because I do not know how to do it. I thought that you need a empty project to implement this logic. -
@mmaarits LOL, Didn't see that. :). But what do you want eactly? The same bot as ggrobot?
-
ggrobot stores Fractal values, compares it with current candle close and then takes trades.
But I want:- If the latest downward Fractal is lower than previous downward Fractal AND latest upward Fractal is also lower than previous upward Fractal - then it is a SELL trade.
- If latest upwards Fractal is higher than previous upward Fractal AND latest downward Fractal is also higher than previous downward Fractal - then it is a BUY trade.
-
@roar I WROTE MY OWN CUSTOM INDIC WITH MY LIMITED KNOWLEDGE , LOT OF WORK BUT IT WORKS
-
@ralph DRWING HORIZONTAL FR LINES
-
@mmaarits Then you need to store all those values into three different variables. The you can compare those values exactly as you need.
-
@l-andorrà said in FRACTALS DEFINITION:
n you need to store all those values into three different variab
Why it is necessary to have three different variables? Can You explain it a little bit more?
-
@mmaarits Well, you need to compare three fractals, right? This is why you need at least three variables. For example, you can catch the last fractal up with a variable like this:

You can do the same with the last fractal down in a different variable. Both variables are nubers (their are proce levels after all). Once thay are stored into variables you can do calculations like this:

As you can see I had to create a fourth variable called 'lst fractals distance'. This will be the result os subtracting the lower from the higher.
-
@l-andorrà No, I do not want to compare fractal up and fractal down, instead of that I would like to compare one Fractal before the very last Fractal and the last Fractal. That means: one fractal up before the very last fractal up > last fractal up AND one fractal down before the very last fractal down > last fractal down = SELL
And vice versa for the BUY trade: one fractal up before the very last fractal < last fractal up AND one fractal down before the very last fractal < last fractal down.
-
@mmaarits Ok. Then you need 6 variables. One for each fractal value and then the other two for comparing those values as you say. The use of values and the 'formula' block is the same but with different values.
-
My original idea was to have 4 variables:
- latest_Fractal_up
- previous_Fractal_up
- latest_Fractal_down
- previous_Fractal_down
First condition is that previous Fractal up and Fractal down must not have default values (that means I have stored also previous Fractals values and not only latest Fractals values).
After that for a SELL trade, the second condition is that latest_Fractal_up < previous_Fractal_up
AND latest_Fractal_down < previous_Fractal_down
and vice versa for the BUY trade.
BUT, I need to update previous_Fractal_up/down variables if new Fractal appears, that means previous_Fractal_up/down needs to replace with latest_Fractal_up/down value. Unfortunately, I am not able to implement that logic.The better idea would be to implement logic in another way, because previously written algorithm needs to run EA for a while until it gets all Fractals values. Much better way would be, that EA reads Fractal values backward. That means, EA checks if Candle ID 3 has fractal values, if not, then check Candle ID 4. If Candle ID 4 has upper Fractal value then the EA stores it and continues this checking process until both previous (not only latest) Fractal up and down values are stored.
-
@mmaarits Yes, reading backwards is alway more effective. However, the only way to do it is by creating a loop to do that. That is not my field of expertise, though.
Maybe roar could give us a hand? 
-
@l-andorrà said in FRACTALS DEFINITION:
@mmaarits Yes, reading backwards is alway more effective. However, the only way to do it is by creating a loop to do that. That is not my field of expertise, though.
Maybe roar could give us a hand? 
@roar Can You help me out? That would be awesome!
-
@mmaarits hi!
To keep it simple, here's an algo just to keep track of those 4 fractals. You can add the comparisons and trade operations yourself, right?
https://fxdreema.com/shared/A9UObbiqe
up1 is latest up fractal, you get the rest...

-
@roar Thank You very much! Yes, I will do the rest by myself. Thanks a lot again!
-
Hello I would be very curious to know how you solved your problem.
Can you see your project??
thanks a lot