![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
Hello,
I think your problem is
I am a complete noob at this code thing, but where is the exit?
SL,TP,0,clrNONE
Hello,
I think your problem is
I am a complete noob at this code thing, but where is the exit?
Hello GrompyDuckMan. Why would the magic number cause a problem? I'm unsure on how to code this EA without that magic number in order to ensure it only works on its own trades.
With regard to your second question, this EA does not have any technical exit rules yet. Exits are handled by the SL, Trailing Stop or TP. Is that what you were asking about? Sorry if there is any confusion, I didn't fully grasp the question.
Thanks
Hello GrompyDuckMan. Why would the magic number cause a problem? I'm unsure on how to code this EA without that magic number in order to ensure it only works on its own trades.
With regard to your second question, this EA does not have any technical exit rules yet. Exits are handled by the SL, Trailing Stop or TP. Is that what you were asking about? Sorry if there is any confusion, I didn't fully grasp the question.
Thanks
and
Is it i,a or pos.
You never return anything... there is a return value
and
Is it i,a or pos.
You never return anything... there is a return value
Hi Grumpy, thank for your reply. As you can see from the thread, I'm not a very experienced coder. This is my first EA and my first real foray into the coding world. In the above code, I have used "i","a" and "ord" for different purposes. If I were to change the "a" or "ord" I would get a warning about hiding the original declaration of i. Not sure if this is a big deal but I tend to try and avoid confusion if I can. I was under the impression that when return is used inside a void function it should not return a value?
Thanks