Hello, I would like to ask if its possible to create following strategy in EA Wizard:
Open long limit order if: Bid < EMA148 minus 100 points & MACD0 > MACD1
Exit long: Bid > EMA148 or profit of all currently open trades > 40 USD (what will happen sooner)
– minimum price distance between all limit orders is 50 points
– minimum “bars” distance between two limit orders is 10
– base (first) position size is 1 lot and all next are multiplied by coeficient 1,4
So for example: Exponencial MA with period 148 is on price level 1,41000, bid is currently on level 1,40005. So one condition for long limit order is OK, as we are bellow 1,40900. Let assume MACD0 crosses over MACD1, so limit order with 0,01 lot will be set.
But the price is not going hihger, but lower to 1,39999. Because distance between last limit order and actual bid price is less than 50 points -> no additional limit order. Then price is going even lower to 1,39989 and conditions for limit order are met again, but now limit order will be setup with 1,4 lot.
Attached you can find how it looks in metatrader done manually.
Thank you in advance for any idea.
Attachments:You must be logged in to view attached files.
Hello, sorry for later answer.
The limit price will be 100 points above actual EMA148 price for short limit order. So when actual EMA148 price is 1,18500, then short limit price is set to 1,18600 (100 points above this EMA).
If the short limit price will be not filled, then it should be deleted when price crosees bellow EMA148. (so it is not valid for xy bars, but intil price touch EMA).
Also when Take profit will be realized, all not filled limit prices should be deleted and strategy should start “from beginning”.
You must be logged in to reply to this topic.