Hey all.
I am now to coding, and am trying my best, however I seem to have hit a wall with this one. This EA is 'hacked' together with heaps of code from other EA's, so it doesnt flow the best yet, as I have not cleaned it up. (any tips on cleaning it up would be appreciated)
However the main problem I am having is "Open Sell Stop Order - Error 130: Invalid Stops"
It also occurs alot more often on the Sell side rather than the buy. I have attached the EA.
Any ideas would be welcome.
EA:
First: read and implement what is in this thread: What are Function return values ? How do I use them ?
Second: what happens if the bar you are using is tiny ? you can't have your entry and stop at the same level, you need to code a check on this . . . this article tells you what you need to check for: Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
Third: your takeprofit appears to be always 10.000 ?? on GBPUSD that is a long way away . . . on GBPJPY it is a log way away in the other direction . . .
Hey Raptor.
Thanks for the "Function Return Values" That will come in handy
As I said, there are a heap of other holes in it, that 10 is simply left in there from another test I did. The issue about the small bar, again, havent developed that check yet either.
The only part of this code that I am focused on at the moment is fixing the stop loss error.
Mike
Hey Raptor.
1. Thanks for the "Function Return Values" That will come in handy
As I said, there are a heap of other holes in it, that 10 is simply left in there from another test I did.
2. The issue about the small bar, again, havent developed that check yet either.
3. The only part of this code that I am focused on at the moment is fixing the stop loss error.
Mike
1. isn't handly . . . it is essential. Add it to your code.
2. needs to be addressed as it's most probably causing 3.
Read your code, follow through line by line when you have a bar 2 candle that has a high and low with the same value . . . what happens then ?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey all.
I am now to coding, and am trying my best, however I seem to have hit a wall with this one. This EA is 'hacked' together with heaps of code from other EA's, so it doesnt flow the best yet, as I have not cleaned it up. (any tips on cleaning it up would be appreciated)
However the main problem I am having is "Open Sell Stop Order - Error 130: Invalid Stops"
It also occurs alot more often on the Sell side rather than the buy. I have attached the EA.
Any ideas would be welcome.
EA: