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.
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.
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?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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