Reply

Find last broken Fractal

7 replies

D0NKbet

Subscriber, bbp_participant, community, 6 replies.

Visit profile

8 years ago #113580

Is there a way to define the last broken fractal. So let’s say open a trade if some indicator has a certain value AND the last broken fractal was a down fractal?!

 

I’m looking forward for any help since I couldn’t find it myself so far.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #129762

can you post a screenshot showing what you mean exactly?

Mark
StrategyQuant architect

0

D0NKbet

Subscriber, bbp_participant, community, 6 replies.

Visit profile

8 years ago #129767

<image missing>

You can see that there is a down fractal, shown as number_1 that has been broken. The break of this fractal is shown as number_2 ‘“ this is the break-point of the fractal. However, the last fractal to be broken is the up fractal shown as number_3, the break-point of this fractal is shown as number_4.

0

D0NKbet

Subscriber, bbp_participant, community, 6 replies.

Visit profile

8 years ago #129768

A lot of strategies I used so far (and want to create with EA Wizard) use the last broken fractal of a higher timeframe to define the trend direction so it would be great if there is a way to do this. 

0

D0NKbet

Subscriber, bbp_participant, community, 6 replies.

Visit profile

8 years ago #129945

Or to put it another way -> how can I include a custom function? That would solve even more problems than this… 

 

for this problem I could just write a custom indicator returning the last broken fractal or the direction based on that. 

for other problems (like the unique magic number) I would need to include a custom function… 

 

any advice on how to do that? would be really gratefull… 

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #129947

custom functions – you can write any custom MQL function and put it to /code/CustomFunctions.mq4

The contents of this file will be inserted into every EA generated by EA Wizard.

 

Then, in EA Wizard you can use Functions -> Custom Function to call this code and compare its result with something.

 

You can maybe also use Functions -> Recent(), Indicator Lowest Value(), Indicator Highest Value() together with Fractals indicator to get the last fractal values.

Mark
StrategyQuant architect

0

D0NKbet

Subscriber, bbp_participant, community, 6 replies.

Visit profile

8 years ago #129953

Thx for the response. That might help me to solve my problem. So I’ll just create that CustomFunctions.mq4 and pack it with all the stuff I frequently need. 

 

One last thing -> when creating an order can I use a custom function to assign the magic number? If not -> that would be great in the future.

0

Mark Fric

Administrator, sq-ultimate, 2 replies.

Visit profile

8 years ago #129960

One last thing -> when creating an order can I use a custom function to assign the magic number? If not -> that would be great in the future.

 

you generally can, but it might have consequences. EA from EA Wizard is made so that it uses magic numbers to control its orders, including things like trailing stop, move to BE, etc.

So the magic numbers are hardcoded into the generated EA for every order.

 

If you’ll create some random magic number for your order the EA will not know its value, so it will be not able to move SL or do any order manipulation.

Mark
StrategyQuant architect

0

Viewing 7 replies - 1 through 7 (of 7 total)