BREAKOUT REVERSAL EA
-
Hey guys!
i'm looking for a basic EA that does the opposite of a "regular" Breakout EA.
For instance, I want it to Sell above X amounts pips after market has taken a previous day/week/high high and has reached an X amount of pips which can be define and, Buying below a previous day's/week's/month's/ low after market has reached X amount of pips.
So it would be something like this in coder's language:
Condition 1: If Previous "Day", "Week" or "Month"'s High has been breached above "X" amount of pips, then Sell by Market with a SL/TP in pips previously defined by user.
Condition 2 (the opposite): If "Low" of Previous' "Day", "Week" or "Month" is reached and goes below "X" amount of pips, then Buy by Market with SL/TP in pips previously defined by the user.No need to include Trailing, or partials, etc. but it would be great if any can help me out!
regards!!
-
Do you have any initial project to begin with?
-
Yes I tried with the attached, using an example from the forums.1_1589150102007_102030 DAILY .mq4 0_1589150102007_102030 DAILY .ex4
-
Could you please share the project link instead of the compiled files?
-
Sure, here it is:
-
Don't connect the fisrt two blocks of each tree on top of the launching structure. You need to create a second structure for them. This means that blocks 1 and 2, as well as 15 and 27 need to be removed from its cuirrent position and connected under a 'Pass' block.
-
u lost me lol...anyways, thank you anyway, I'll try to find a coder make this for me.
-
@l-andorrà
U mean like this? -
That's much better, but not exactly. Just use one 'break even block on the left (for buys and sells) and one 'trailing stop' block on the right (fir buys and sells). You do not need to duplicate any of them unless you are programming different settings for buys and sells (as is not the case).
-
Like this?

-
There's an offset pips on the "buy pending order"...can this be used also in the "buy now"? I mean, say that after the "condition" for buys is triggered, can the "pending buy order" be placed right away X# of pips above or below price?
-
No, no no. The previous configuration was correct. Just modify this:

-
Thanks! u mean like this?

Also, How can I the EA just open 1 trade per week? because sometiems it opens several a week and it it meant to be used for day trade or swing trading.
-
No. This part of your project is correct:

Then add a separate tree as I suggested.
If you want just one trade per week you need to create a boolean variable identifying if that trade happened or not and reinitialize it every week.
-
oK this is getting a bit harder than expected... how can I incorporate the use of trendlines like in this tutorial (https://fxdreema.com/forum/topic/4233/example-trendline-ea) but like for instance with the aid of this indicator (Daily Line Boxes : 1_1592155731375_Daily LinesBoxes(1).mq4 0_1592155731375_Daily LinesBoxes(1).ex4 )
**So say that once new week open the EA will consider when condition for buys is true:

Where NAME: PWL1 is the previous week low trendline as shown in this image:

So once is goes below this level it will open a buy limit. -
Wow. Trend lines are a completely different world my friend. Would you need strictly horizontal lines, perhaps? That would be way easier to implement. Angled trendlines ar simply tough to do.