Professionals, let's create an EA together! - page 4

 
Vladimir Gribachev:

All right, here we go. Here we go.

First question immediately.

1. momentum? - What kind of impulse, just Fibo levels or something else?

I'll use the ZigZag.

2. Will the owls have 2 takeout levels? Partial close in the parameters or close from half of the volume?

1. we take ZigZag with parameters 30-5-3, work out only last two lines.

2. You can open two identical orders with two TPs, or you can open one with a partial closing (half of a position) at TP1. Upon reaching TP1, we always move the second position to the no-loss level. Opening a position at 50% with the worst price including the spread, and closing upon reaching TP also at the worst price.

3 The Zigzag indicator overdraws, but that is not a problem, we should still only look at the last two lines. With the penultimate line there is no problem, and the last line (that is, the current line) is changing, it means that the entry should also change before opening and closing the trade. That is - at time M the length of the zigzag was 100 pips and the price went down to 50 and entered the market with Fibo targets. Then the price quickly reached TP1 and TP2 levels and the zigzag line changed its size, i.e. we will wait for the new 50% level again for the next buy entry. We should also add the option to move open orders to no-loss if opposite orders are opened and the price has reached a minimum of 38.2% Fibonacci.

 
Izzatilla Ikramov:

I will write as I myself see easy to implement - if you have any ideas, we'll discuss too.

1. By an impulse I mean a price move, where the price moves relatively in one direction. For convenience, we will use the ZigZag indicator with parameters 30-5-3. We will work out the last two lines of the ZigZag. I believe the construction of Fibonacci lines using this method is clear.

2. The deal will be entered at 50% level with two market orders at the worst price (i.e., buy at Ask price, sell at Bid price). Take Profits should also be closed at the worst price. Two variants - look how easy to implement and how convenient it would be in the future: a) you can open with two identical orders and set two TPs, b) you can open with one order and close half of it after TP1 is reached. The maximum number of open orders in the EA will be 4 (two to buy and two to sell in variant 1) or 2 (one to buy and one to sell in variant b)

3. For a stop loss, there should be two options - a) a stop loss is triggered if price touches the 61.8% level, and b) a stop loss is triggered if price finishes below 61.8% in TFSL (eg bar close price on H4 is below 61.8%)

I personally did not like the description at all:

1. "...where the price is 'comparatively' moving in the same direction". Comparatively with what? Maybe it would be better to formalize: take the minimum ratio of the momentum ray (penultimate) to the correction ray (last), for example 2:1 = 50% of the momentum. I.e. if the current ray (of correction) is formed after 50% of the size of the previous ray - the position is not opened.

2. Immediately at 50, it seems to me, is not worth entering. Let the price pass the 50% level (by the way, it would be better to make the level a parameter: 23.6/38.2/50/61.8) and go back with a close above it - then we open a position. And the entry is in both directions. Maybe only in the direction of the momentum ray to open a position (in the video you posted a link to here, I did not notice that the man trades both ways). And yes, maybe we should also add a "limiter", i.e. if the level is set at 50% and the limiter is 61.8% and the price breaks through 61.8%, after it returns to the 50% level, the position is not opened. The limiter is also set in the input parameters.

SL/TP, number of orders - to your taste).

 
Alexey Kozitsyn:

Personally, I didn't like the description at all:

1. "...where the price "comparatively" moves in one direction". Relative to what? Maybe a better formalization: take the minimum ratio of the momentum ray (penultimate) to the correction ray (last), for example 2:1 = 50% of the momentum. I.e. if the current ray (of correction) is formed after 50% of the size of the previous ray - the position is not opened.

2. Immediately at 50, it seems to me, is not worth entering. Let the price pass the 50% level (by the way, it would be better to make the level a parameter: 23.6/38.2/50/61.8) and go back with a close above it - then we open a position. And the entry is in both directions. Maybe only in the direction of the momentum ray to open a position (in the video you posted a link to here, I did not notice that the man trades both ways). And yes, maybe we should also add a "limiter", i.e. if the level is set to 50% and the limiter is 61.8% and price has broken through 61.8% after returning to the level of 50%, the position is not opened. The limiter is also set in the input parameters.

SL/TP, the number of orders - to your taste).

It is good that you have saved my first post - I accidentally deleted it when editing.

For point 1, I think that the size of the rays should not be limited, let the EA will work out all the rays and, perhaps, using the EA, you will be able to trade on small timeframes.

Regarding point 2 I agree in general, but it should be noted that there are many examples when the price reaches 50% point and then immediately reaches take profit, in such cases, we will either enter very late or miss the signal.

Yes, you can't see that the author traded opposite orders, and I also wrote that we work in the direction of the signal that appeared on the timeframe above, YOU are right - let's not invent new ones - we work out the signals that coincide with the direction of the signals on the TF above.

 
Izzatilla Ikramov:

1. take the Zigzag with the parameters 30-5-3, working out only the last two lines.

2. You can open two identical orders with two TPs, or you can open one with a partial closing (half of a position) at TP1. Upon reaching TP1, we always move the second position to the no-loss level. Opening a position at 50% with the worst price including the spread, and closing upon reaching TP also at the worst price.

3 The Zigzag indicator overdraws, but that is not a problem, we should still only look at the last two lines. With the penultimate line there is no problem, and the last line (that is, the current line) is changing, it means that the entry should also change before opening and closing the trade. That is - at time M the length of the zigzag was 100 pips and the price went down to 50 and entered the market with Fibo targets. Then the price quickly reached TP1 and TP2 levels and the zigzag line changed its size, i.e. we will wait for the new 50% level again for the next buy entry. We should also add the option to move open orders to no-loss if opposite orders are opened and the price has reached a minimum of 38.2% Fibonacci.

If that's all, here's a half an hour outline.

Feel free to use

Files:
Fibo.ex4  13 kb
Fibo.mq4  8 kb
 
Izzatilla Ikramov:

Good thing you saved my first post - I accidentally deleted it when editing.

As for point 1, I don't think there should be any limitations on the ray size, let the EA work all the rays and maybe it will be possible to trade on small timeframes with the help of the EA.

Regarding step 2, I agree in general, but you should bear in mind that there are many examples when the price reaches the 50% level in point-points and then immediately reaches take profit, in such cases, we will either enter the market very late or miss the signal.

1. Not a limit on beam size, but a limit on the ratio of beam sizes.

2. ok, we can add a configurable range from the level.

 
Vladimir Gribachev:

If that's all, here's a half-hour outline.

You're welcome.

Thank you. (chuckles) Testing. On the chart, the open position has lost its TP.

 
Izzatilla Ikramov:

Thank you. Testing. On the chart the open position has lost its TP.

So what if the zigzag redraws, then ..... What do we do now?

Let me know what you need me to do.

 
Try writing owls on this zig-zag. it is without redrawing.
 
I added a ZigZag filter to the high TF, I didn't think much of it (so the code is a bit longer because of that)
Files:
Fibo.ex4  17 kb
Fibo.mq4  8 kb
 
Vladimir Gribachev:

So what if the zigzag redraws, then .... What do we do now?

Let me know what you need me to do.

At first glance, you can set the zig-zag backstep parameter to 1.
Reason: