Tâche terminée
Spécifications
Please make an offer for the programming for an expert advisor. The quarter-hour chart on the DowJones is to be traded at certain times of the day.
The entry (long) should only take place after a hammer formation, if in the following quarter of an hour (last stick) the DowJones course exceeds the upper end of the hammer formation.
If the hammer candle is not exceeded in the next stick (quarter of an hour) or if it breaks below the lower end of the hammer candle before rising above it and only then rises above the hammer candle, no trade is opened. In summary, the momentum of the increase should be used. As an an example:

The underlying hammer formation must, however, "undercut" the previous candle above and below at both ends - at least be the same below.
The StopLoss is at the lower end of the hammer candle.
The TakeProfit is calculated as follows - the length of the hammer candle divided by 2.
Example: If the upper end of the hammer candle were 15,100 and the lower end 15,000, the SL limit would be 15,000 and the TP 15,150.
The candlestick price limit must always be adjusted by the spread.
The length of the spread in the above example would be 5, the entry would only take place at 15,105 and the stop loss at 14,995.
The purchase amount should be variable and always adjusted to the maximum loss size.
Therefore an automatic calculation would be perfect for TakeProfit and Stoploss. As an example: Maximum minus of 20 EUR and TakeProfit of 10 EUR.
The trading times should be variably adjustable.
In the opposite case (short) the same logic should be programmed - only everything reversed.
Examples:
(Example of a negative trade - the third candle is the hammer candle described, the entry at the 4th candle took place when the price exceeded the hammer candle, but the DowJones price did not rise by half the hammer candle (TakeProfit) and the stop -Loss limit was triggered on the last candle when it broke the lower end of the hammer candle.)

(example of a successful short trade)

(Example where there would have been no entry because the lower end of the hammer did not undercut the previous candle)

(There is no entry because the upper end of the hammer (2nd candle) has outbid the pre-candle.)

(There is no entry because the next candle after the hammer (2nd candle) has not risen above the hammer candle - only the second candle after the hammer has risen above it.)

(There is no entry because the subsequent chart after the hammer fell below the lower end of the hammer and (very likely) only then rose above the upper end of the hammer.)

I would define the hammer candle for a long entry as follows:
The total length including the wick should be measured (regardless of whether the body is red or green).
If the body is within 100% to 55% of the top, it is a hammer candle.
Example:
The candle, including the wick, ranges from 15,000 to 15,100.
The total length is therefore 100 euros.
So if the body is between 15,100 and 15,055, it is a hammer candle defined by me.
Conversely: from the lower end.
In this short example, the body should only be between 15,000 and 15,045 (no matter how big and what color).
I hope that I was able to help solve the problem and that it can be programmed that way.