Help me write an EA, thanks in advance - page 22

 
Profits, everyone, I'm off to rest.
 
I also suggest that stop and profit levels should not be taken at random, but should be set on the basis of the daily high and low, so it would be more reliable. The author of this topic is probably subconsciously doing this when he trades manually, we should introduce it in an automated system.
 
evillive:
I also suggest that stop and profit levels should not be taken at random, but should be set on the basis of the daily high and low, so it would be more reliable. The author of this topic is probably subconsciously doing this when he trades manually, we should introduce it in an automated system.
By the way, it's a good point!!!!
 
evillive:
It will be too slow a game. Some use fractals, some use inside bars, some use something else - there are many recipes, the important thing is that the probability of price returning to this level should be minimal.
 
take half of the previous day's high and low?
 
Lucas_SPb:
take half of the previous day's high and low?
There are different days in terms of volatility.
 
DmitriyN:
There are different days in terms of volatility.

Well, if today's volatility doesn't suit you, you can take extremums over two days.
 
Lucas_SPb:
Take half the highs and lows of the previous day?

Yes, approximately so, although you can take today's candlesticks to complete the picture, and if you trade on D1, you will have to look back a month. That is, somewhere between 30-70 candlesticks depending on the timeframe, you can take an external variable, for example.
 
evillive:
Well, if today's volatility does not suit you, you can take extremums for two days.
The goal is that the price does not pass through the stops, or rather, it passes through as few times as possible. I.e. stops should be placed where it would be extremely unprofitable for the broker (market) to lead the price. On the contrary, TRs should be placed where it is profitable for the broker (the market) to guide the price.
I doubt that this logic can be passed in a code, here every time you have to think, look through options, choose options with the best ratio [profit/risk].
 
DmitriyN:
The goal is not to let the price pass through the stops, or rather, to let the price pass through as few times as possible. Stops should be placed where it is extremely unprofitable for the broker (the market) to drive the price. On the contrary, TRs should be placed where it is profitable for the broker (the market) to guide the price.
I doubt that this logic can be passed in a code, here every time you have to think, look through options, choose options with the best ratio [profit/risk].

Well it is so according to the author's description as soon as the price touches a stop (which is at the same time a profit for a double lot order), the whole order batch will be closed and the total profit will be positive. Ideally, the price will immediately move to the necessary place and the first order will close on profit without opening a position but we have very little chance to find it, so we may reach 10 orders, i.e. with 0.01 initial lot we may reach 10 lots, which is another extreme case.