cornesti: which says "invalid stops". I tried to put the StopLoss on 0, but it didn't worked.
|
|
WHRoeder:
cornesti: which says "invalid stops". I tried to put the StopLoss on 0, but it didn't worked. |
|
thank you a lot for your answer
to the first point: you are absoultely right, I don't have to multiply the Spread with POINT, but this wasn't the problem.
The problem was, that I was backtesting the EA from 1.1.2013 and H was calculated using data from the last year and was lower than the Ask price. Therefor I couldn't open a Buystop.
wish you a nice day.
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
hello everyone,
Is everyone ready for the important news, which are comming out today? I'm looking forward to a very volatile market.
But now to my question:
I'm working on an Expert advisor and everythink is going well except from one thing. I have here my two functions BUY() and SELL(), with the parameters H and L, which are prices. If I start the expert advisor, the SELL() function works fine but not the BUY() function. I get the OrderSend error 130 (https://docs.mql4.com/constants/errorswarnings/enum_trade_return_codes), which says "invalid stops". I tried to put the StopLoss on 0, but it didn't worked. I also want to mention that these two functions are called at the same time and are absolutely identical (except for Buystop / Sellstop). Does anyone know what I could do ?