Работа завершена
Техническое задание
Hi guys, I’d like to create a fairly simple EA for position management after I manually enter with the following requirements:
Manual buy/sell initiates EA via a buy/sell panel top left corner of the chart.
Risk % / Stop Loss / Take Profit 1:
Total Risk default 1.5% of account size (adjustable)
Initial Stop based on ATR . default 1.6 ATR (50)
Take Profit 1 placed at 1.6 ATR (50) on half position only
Initial Stop moved to breakeven (entry level) on TP1 being hit
(Once TP1 is hit , trailing stop starts)
Take Profit 2 - a simple trailing stop based on price action:
Rule for trailing stop: When short, the trailing stop is moved to ATR 0.25 (14) above the high of any bar which fails to make a new low VS the previous bar. The exception is the first failed low bar is NOT included in the count: so from ‘failed low 2’ onwards. (an equal low vs previous bar is included as a failure to make a new low)
-Extra note on Trailing stop: its important that the failed low count is from when the trade is manually opened but does not move/trail until T1 is hit and stop to breakeven. If there has been 2+ failed highs/lows before the TP1 is hit . and the TP1 is triggered , then the stop will move to either the breakeven point or straight to the trailing stop level. whichever is further in the money at the time.
(Vice versa for Long positions - replace failed lows with failed highs etc)
Optional Final Target
-An optional ‘final target’ price can be entered which would close the whole position essentially overriding any other open orders if it is reached. but this is an optional to enter and default ‘none’
-it should close the remaining open position whether half or none has already been closed.
Other features to be included:
-Must have capability to be used on any chart timeframe. i.e I can have one trade running with these rules based on 5min bars and one running on the hourly bars, one on daily at the same time depending on the chart I executed on. It must be able to be used on multiple symbols (whether forex/futures etc) at the same time. and even the same symbol on different timeframe e.g usd/jpy hourly & usd/jpy 15mins
-All inputs are manually adjustable from the default settings
-And just to be sure! - the trailing stop will never move back, only forward
Hope its all clear - please check if not !
Thanks in advance
Mark