仕事が完了した
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
Define a Range: Highest and lowest Price of a Period last X Candles. The Period must be Adjustable by the User.
Orders:
-The EA must create a Buy Stop Pending Order on the Top of the Range and a Sell Stop Pending Order at the Bottom of the Range.
-No TP
-SL:
SL Distance = ATR (Recent Candle) * X (X =ATR Multiplier)
E.g.: For Buy Orders: Close of the recent Candle - SL Distance. For Sell Orders: Close of the Recent Candle + SL Distance. The ATR Multiplier and the ATR Period must be adjustable by the User.
You will Risk 2% of your Account. The Risk must be Adjustable by the User.
If your position is winning and you are up the amount you have risked (e.g. SL @ -100 but your position is +100) you open a new position, your SL is again -100 and your SL of the first position must be moved to break even. The risk is again 2% but your account is up 2% and you want to risk the unrealised profit too. Well, this explaination is not 100% correct, the EA must create a new pending order at place where have 1:1 CRV. More in the Video.
And so on, every +100 you open a new position and move the SLs accordingly (-100 for the newest and all other trades have to move their SL +100). The maximum amount of additional positions must be adjustable, on some assets you only want 2 additional trades, on some you want 15.
There is no TP, you only trail with the SL every +2%.
Most of the times you will have additional range breakouts in the same direction during the running trade but you obviously don't want to trade them, we have to filter them out.
But we might want to take the different direction. This means that a Short Trade is allowed while a Long Trade is running and vis versa (we have a Pending Order according to the rules at the other end of the Range). But this must be adjustable by the user (allow hedging - yes/no).
Set a Time Filter -> Set Trading Time e.g.: 9:00 to 17:00 (no pending orders outside these times current pending orders must be delted)
User Inputs:
-Range Period -> How many Candles to define low/high
-ATR Period -> How many Candle to define the ATR Value
-ATR Multiplier -> The SL Distance is calculated by the ATR Value * ATR Multiplier
-Risk per Trade in % -> How much to Risk per Trade
-Max. Additional Trades
-Use Time Filter? Yes/No
-Time Filter -> Set Trading Time e.g.: 9:00 to 17:00 (no pending orders outside these times, existing pending orders must be deleted)
-Allow Shorts? Yes/No
-Allow Longs? Yes/No
-Hedgemode -> Are Pending Orders in the different Direction allowed?
-E-Mail Notification? Yes/No
-E-Mail when: - new Pending Order @Symbol with @Price with @SLPrice
- Pending Order @Symbol Deleted
I have uploaded a Video to YouTube to explain the Strategy, HMU if you want the link.