Competition. I will write an expert for free. - page 15

 
Vadimus >> :

I'm willing to take your advice on a neighbouring thread. Here is the algorithm:

An expert on fractals.

Here is a question. Do buy and sell orders work simultaneously and independently? I.e., if a fractal appears and we place a sell order. Then the order did not work, but the fractal appeared upwards. Should we cancel the sell order and place a buy order or should we leave the sell order?

And when a buy order is triggered, do we remove the sell order or not?

 

This example will demonstrate how to write a strategy for the AutoGraf 4 application.

Notes.

1. You don't have to use a large font.

2. Specify the order type.

3. I suggest that the decision to set orders is made when a new fractal appears, i.e. no other criteria should be considered.

4. What to do if there is an order opening criterion (e.g. BuyLimit), but 2 such orders have already been manually placed before?

- modify one of the existing ones
- install a new one.

5. If a TP is manually set for an order, what should I do?

- delete TP

- do not do anything.

6. If it is impossible to put SL on the extremum of candle 4?

- set it to the nearest possible place

- other solution.

7. What is trailing on candlestick shadows? It is possible to trailing at some distance from the market price. Is it ok?

--

There will be more questions later.

 
sergeev писал(а) >>

There is a question. Do buy and sell orders work simultaneously and independently? I.e., if a fractal downwards occurred and we placed a sell order. Then the order did not work, but the fractal appeared upwards. Should we cancel the sell order and place a buy order or leave the sell order?

And when the buy order is triggered, should we remove the sell order or not?

Perhaps you would like to try writing a strategy for AutoGraf 4 based on the suggested ToR?

If you undertake to write it, let me know. In that case, I will help you write the AutoGraf 4 tool management code correctly.

The tools you can use here are:

- pull up behind the price (trailing);

- close by time.

 
sergeev писал(а) >>

There is a question. Do buy and sell orders work simultaneously and independently? I.e., if a fractal downwards occurred and we placed a sell order. Then the order did not work, but the fractal appeared upwards. Should we cancel the sell order and place a buy order or leave the sell order?

And when a Buy order is triggered, do we remove the Sell order or not?

A situation may occur when the Expert Advisor places two opposite orders. This is possible if one order has not opened and conditions have appeared for placing the second one. After a certain period of time, limited by the specified number of candles, the early order is deleted. Two positions cannot be open at the same time.

I am not quite clear what you mean by fractal downwards or fractal upwards. I will try to be more precise. If the fractal is on the maximum, the position will be opened downwards and vice versa.

 
SK. писал(а) >>

This example will demonstrate how to write a strategy for the AutoGraf 4 application.

Notes.

1. You don't have to use a large font.

2. Specify the order type.

3. I suggest that the decision to set orders is made when a new fractal appears, i.e. no other criteria should be considered.

4. What to do if there is an order opening criterion (e.g. BuyLimit), but 2 such orders have already been manually placed before?

- modify one of the existing ones
- set a new one.

5. If a TP is manually set for an order, what should I do?

- delete TP

- do not do anything.

6. If it is impossible to put SL on the extremum of candle 4?

- set it to the nearest possible place

- other solution.

7. What is trailing on candlestick shadows? You can trailing at some distance from the market price. Is it ok?

--

There will be more questions later.

1. I just copied the text from a Wordov document, and it was that size. I will correct it.

2) Orders only buy stop and sell stop.

3. Yes, I agree. After the close of candle 4 a fractal appears, this is the moment we should place orders

4. After a given time the open orders are removed, there cannot be more than two differently directed orders. The set time (3-4 candles) is short enough to prevent the number of orders to increase by more than two.

5. The system does not provide for TP setting. But if the TP is set manually, the position must be closed when this level is reached.

6. If the distance does not allow setting SL to the extremum of the candle 4, then you have to do it at the closest to it distance.

7. Speaking about trailing candlestick shadows, I meant the following: after closing each candle, the stop is moved one pip higher (lower) than the extremum of the previous candle, taking into account the spread.

 
Vadimus >> :

7. By trailing candlestick shadows I mean: after the close of each candlestick, the stop is moved one pip higher (lower) than the previous candlestick extremum, taking into account the spread.

Not of the previous candle, but of the previous n candles.

 
TheXpert писал(а) >>

Not the previous candle, but the previous n candles.

Note about the case. I often use trailing stops on the previous candle, but it does not mean it is better. I accept the remark, thank you.

 

Vadimus писал(а) >>

Entry: Enter after the opening of candle number 5, when the fractal has already been formed and the fractal symbol appears. It is necessary to enter one point above (below) the extremum of the candle number 4. One should enter using a pending order.

Does our TOR imply that we should enter using two orders (two extrema)?

Or is there still a binding to the fractal - up or down?

 
sergeev писал(а) >>

According to the terms of reference, do we enter with two orders (there are two extrema)?

Or is there still a reference to a fractal - at the top or at the bottom?

Why two extrema? The extremum is considered only the last one and an order is set at it. But, if the order does not work and an opposite extremum is formed, we review it and set another order. At this time or very soon afterwards the first order is deleted as the lifetime of a non-triggered order is limited to 3-4 candles.

 
Then a drawing from you would be desirable. I'm kind of confused about the extremum of candle number 4
Reason: