Hi,
I only just started last week to learn a bit about coding EAs
I've been doing ok, but I am totally frustrated when it comes to using functions
I wrote some code as a function in a program to work out the lot size to be used according to equity balance, risk % and stop loss size.
I spent hours and hours trying to find out what I was doing wrong as I just kept getting errors when trying to compile it.
In the end, I simply inserted the code instead of the function call in the program. Not too difficult as it was only called twice. It compiled ok then
Obviously, I am making some sort of rookie mistake that is quite obvious to those with experience.
I even tried copying from examples and couldn't get them to compile either.
I attach a shot of a simple function and the compiler errors
Can somebody please tell me what I am doing wrong?
I only just started last week to learn a bit about coding EAs
I've been doing ok, but I am totally frustrated when it comes to using functions
I wrote some code as a function in a program to work out the lot size to be used according to equity balance, risk % and stop loss size.
I spent hours and hours trying to find out what I was doing wrong as I just kept getting errors when trying to compile it.
In the end, I simply inserted the code instead of the function call in the program. Not too difficult as it was only called twice. It compiled ok then
Obviously, I am making some sort of rookie mistake that is quite obvious to those with experience.
I even tried copying from examples and couldn't get them to compile either.
I attach a shot of a simple function and the compiler errors
Can somebody please tell me what I am doing wrong?
Attached Image
Please Do Not PM Me With Coding Enquiries