Tâche terminée
Spécifications
I want to have an EA for MT5 that creates opening orders and updates trailing stoplosses based on given input settings.
It should be a scaling-in tool based on Euler Figure compounding. The Euler Figure is 2.71828 which needs to be implemented in this tool.
The following input settings from me as user I need to have before any orders should be created:
1. Risk in US-Dollar (or Euro currency based on the currency the MT5 account has)
2. Stoploss in Pips (for FX pairs) for Indices like SPX (SP500) it should be in points (so if I say 50 points SL for SPX it should be from e.g. 4900 entry price, then SL is here 4850 on a long position). Therefore pip value needs to be implemented.
3. Number of steps (number of steps per Factor = in my Excel sheet I call it "Divisor", which is number of steps based on Euler Figure on Factor = 1)
So number of 20 steps I give as input it means 20 orders needs to be created here for scaling-in
4. Number of Factor (this is the number of how many runs I want to have steps for it. For example Factor of 4 means that for 50 points SL I want to have 4*50 = 200 points Profit Target. With 20 steps for each Factor it means that 80 Orders needs to be created in total here).
Because I use MT5 hedge accounts, the trailing stop of (here 50 points as example) needs to be updated each time once an open order gets executed and gets filled. So in that example on 20 steps for 50 points Sl it means once 4902.5 will get executed it means the new SL is not 4850 but now needs to be updated for all open positions to 4852.50. Each time an order gets filled it needs to be updated.
There is also a broker limit of 100 lots on SPX, so if the calculation get for example 123 lots to be opened on the next step, then it needs to create 2 orders here, one of 100 lots and one of 23 orders, because 100 lots is limit per order on this broker.
The calculation of what lot size to be added must respect the minimum order size of the broker. So if the broker allows minilots only instead of microlots like other brokers, then this needs to be rounded here. Usually microlots precision I want.
Last I need a button where I can exit all open positions at once and delete all open orders. Because if I make different scaling-in setups for different FX pairs or on same symbol but from different entry price level. It needs to be comfortable for me here to do so easily with one click. So in case I have SPX and EURUSD scaling in open orders of 100 orders each, I need to exit positons and delete order fast for one symbol sometimes, like EURUSD.
The limit I know is 200 open orders from MT5. So this needs to be possible as maximum for creating opening orders.
I will attach an Excel File where you can see how I calculate the scaling-in Tool I want to have as an MT5 EA please,
if you get chosen to do this project.