Auftrag beendet
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spezifikation
This should be a simple EA that works with offline chart (e.g. Range bar chart). I will send more information out regarding Box information once the developer is selected. No urgency on this, you can take up to 3 weeks to do it. Thanks for bidding guys!
----------------------------------------------------------------------------------------------
Definition of Green bar: Close price is more or equal to open price
Definition of Red bar: Close price is less or equal to open price
User input Trade = Long or Short
User input ActiveTime = Yes/No
User input Time = X to Y
User input MaxTrade = #
BuyStopLevel = 1000
SellStopLevel = -1000
Section 1. Setup trade once direction of trade is decided
If Trade = Long && current and previous bar is green && BuyStopLevel > 1.2 Box Above level && no active trade
BuyStopLevel = 1.2 Box Above Level, BuyStopLoss = 1.2 Box Below Level, Buy_TP = BuyStopLevel + 0.6 Box Height
Buy stop @ BuyStopLevel with SL = BuyStopLoss, Buy_TP
If Trade = Short && current and previous bar is red && SellStopLevel < 1.2 Box Above level && no active trade
SellStopLevel = 1.2 Box Below Level, SellStopLoss = 1.2 Box Above Level, Sell_TP = SellStopLevel - 0.6 Box
Sell stop @ SellStopLevel with SL = SellStopLoss, Sell_TP
When trade is closed, set Trade = Wait
Let the trade complete before proceeding to B.
Section 2. Set Direction of trade based on previous trade
If (previous trade is long and hit TP) or (previous trade is short and hit SL)
NextTrade = Long, ActivateBuyLevel = 10000
If (previous trade is short and hit TP) or (previous trade is long and hit SL)
NextTrade = Short, ActivateSellLevel = -10000
Section 3. Activate trade based on set direction
If current and previous bar is red && NextTrade = Long && ActivateBuyLevel > 1.2 Box below level
ActivateBuyLevel = 1.2 Box below level
If current and previous bar is green && NextTrade = Short && ActivateSellLevel > 1.2 Box below level
ActivateSellLevel = 1.2 Box below level
If price < ActivateBuyLevel && NextTrade = Long && ActiveBuyLevel is not 10000
Then Trade = Long
If price > ActivateSellLevel && NextTrade = Short && ActiveSellLevel is not -10000
Then Trade = Short
If Trade = Long or Short
Go back to Section 1
Section 4. Money management = Martingale with max trade