This is how it should be entering trades. When it reaches the green lines it enter. And exits when it hits the white line (SMA).
This is what its doing in the historical. It is exiting way away from the white line. Basically after a bar as closed over/under the line.
Is there a setting for this? Or does it need to be accounted for in the code, and if so what needs to be changed?
Comment