Работа завершена
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Техническое задание
Hello,
I need an EA or indicator for MT4 that can calculate the difference in pips between the closing price of the first 5 second candle and my actual trade entry price on the opened MT4 trade.
EXAMPLE:
BUY TRADE: When I open a EURUSD buy trade at 14:30:07 with a fill at 1.0860 and the price at 14:30:05 was at 1.0855 then the script should show me -5.0 pips on the MT4 chart.
SELL TRADE: When I open a EURUSD sell trade at 14:30:07 with a fill at 1.0855 and the price at 14:30:05 was at 1.0860 then the script should show me -5.0 pips on the MT4 chart.
—-—-—-—-
EA should display the following text:
Entry difference: -5.0 pips
I should then have the option in the EA to select in which of the four corners I want to display the text. Should also be possible to select a color for the text.
—-—-—-—-
In case the actual trade entry price is better (more favorable) than the price at 14:30:05 then it should display the pip number with a plus (+) in front.
EXAMPLE:
BUY TRADE: When I open a EURUSD buy trade at 14:30:07 with a fill at 1.0853 and the price at 14:30:05 was at 1.0855 then the script should show me +2.0 pips on the MT4 chart.
SELL TRADE: When I open a EURUSD sell trade at 14:30:07 with a fill at 1.0862 and the price at 14:30:05 was at 1.0860 then the script should show me +2.0 pips on the MT4 chart.
—-—-—-—-
In case my actual trade entry price is faster than 5 seconds after a specified time, then the EA should wait for the 5 seconds to pass and then display me the pip difference between the actual trade entry price.
EXAMPLE:
BUY TRADE: When I open a EURUSD buy trade at 14:30:03 with a fill at 1.0860, EA waits until 14:30:05 and the price at 14:30:05 is at 1.0855 then the script should show me -5.0 pips on the MT4 chart immediately.
SELL TRADE: When I open a EURUSD sell trade at 14:30:03 with a fill at 1.0855, EA waits until 14:30:05 and the price at 14:30:05 is at 1.0860 then the script should show me -5.0 pips on the MT4 chart.
—-—-—-—-
I know MetaTrader 4 doesn’t have Charts in seconds, but I was told that it could either be programmed using ticks or use the time (in the example 14:00:05) to know the price after 5 seconds. If we have to use the time setting route, then it should be possible for me to choose the time manually, for example:
14:30:05, 09:00:05, 16:45:05, etc.
Looking forward to your reply, if something like this is doable. :)