Help with Failed Executed Order
-
Hi Guys,
I am running an EA right now with some scale up money management system on it. Basically what it does, after x criteria is met, it open first trade that i call Base trade.
Then on each x amount of price movement that against me i add more to the position with 1.2x the lot of previous trade.However, sometimes my broker or my MT4 or my VPS failed to execute for any reason. Sometimes a network error or sometimes the log just throw "common failure". The point is this thing happens once in a while which really screw my position sizing.
When the order failed to execute, somehow my EA just keep trying to execute the order but with higher lot position each time it tries to execute it.
Is there any block that i can use after "Buy Now" or "Sell Now" block to confirm if the order is succeed? I want to catch the result and compare it, if the order succeed than it goes to next step but if not, keep try to execute the order but without increasing the position size.
-
Try looping through open positions to get the last successfully placed trad, in the loop grab the volume size and then use whatever formula agaist that valune to increase the size for the next position
-
you could also do a count of open positions before you place anew trade and after. if the value did not increase by 1 then the volume for the next trade should not increase
-
Thanks for your answer.
I did try using loop thru open position but it seems unreliable for me. I'd like the idea of comparing open position before and after trade, however i'm bit confuse on what block to use. I tried to check the "Check Trade Count" block, but i don't know how to store the value of the trade count after using that block