![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Is any good pratice to detect Market Execution and Instant Execution ?
There is cases where booth can be as RFQ as normal mode for diler and confirmation by trader.. (for example gold, silver around maintenance window)
I was trying to modify the ordermodify reliable section to cater for Error 130.
Sometimes my TP is just too close to the market price. On my standard account this isn't an issue as the whole trade is not placed. However with my ECN account the trade is placed but then I have errors when trying to modify the trade, and therefore no SL or TP is entered.
Therefore what I was hoping to achieve was to add a solution for Error 130 by adding the mode_stoplevel to the takeprofit. I thought i had achieved it but in testing every now and then I still get a trade which doesn't get modified.
Can anyone shed some light on what I have done wrong in my coding attempt?
I added from case ERR_INVALID_STOPS: down to default:
I have uploaded the whole .mqh if necessary.
I was trying to modify the ordermodify reliable section to cater for Error 130.
Sometimes my TP is just too close to the market price. On my standard account this isn't an issue as the whole trade is not placed. However with my ECN account the trade is placed but then I have errors when trying to modify the trade, and therefore no SL or TP is entered.
Therefore what I was hoping to achieve was to add a solution for Error 130 by adding the mode_stoplevel to the takeprofit. I thought i had achieved it but in testing every now and then I still get a trade which doesn't get modified.
Can anyone shed some light on what I have done wrong in my coding attempt?
I added from case ERR_INVALID_STOPS: down to default:
I have uploaded the whole .mqh if necessary.
MarketInfo( StopLevel ) is already in Points. So why are you multiplying by Point?
MarketInfo( StopLevel ) is already in Points. So why are you multiplying by Point?
on my standard broker mode_stoplevel = 20 for eurusd therefore i think i needed to multiply by Point or really by pips2dbl (code provided by WHR). I was testing the code against the standard broker, as this is where i have the historical data. I appreciate this complicates the testing a little, but i should be able to get a solution working as i know the stoplevel=20 on this platform.
However just checked on my ECN broker and mode_stoplevel = 0 at the moment, so this would be a problem, and therefore I am not sure i could use mode_stoplevel anyway. I don't want to hard code in amount.
The author of the EA should be able to confirm their EA has been tested on an ECN style account. Not just back tested, but run 'live' for a period of time. Sounds like that's not the case here.
the solution i have decided to go for, for now is
as I don't know with Error 130 whether it is the TP or the Sl that is stopping the modify...
I will try to amend the TP first,,and then if it still fails then amend the TP and SL using the Spread as my increment.
happy to hear any other suggestions...
happy to hear any other suggestions...
on my standard broker mode_stoplevel = 20 for eurusd therefore i think i needed to multiply by Point or really by pips2dbl (code provided by WHR). I was testing the code against the standard broker, as this is where i have the historical data. I appreciate this complicates the testing a little, but i should be able to get a solution working as i know the stoplevel=20 on this platform.
However just checked on my ECN broker and mode_stoplevel = 0 at the moment, so this would be a problem, and therefore I am not sure i could use mode_stoplevel anyway. I don't want to hard code in amount.