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
Complete code:
This is the output:
That isnt the complete code, where is your start() function . . .
Try this code in the Strategy Tester, I get this:
That isnt the complete code, where is your start() function . . .
Try this code in the Strategy Tester, I get this:
Well, the complete code is about 3000 lines. I doubt it would help to post all of that. But I should have said it differently.
When I use your file, it's working. I don't get why it's not working within my EA.
The part I posted is everything, SAR_C is used in. So why isn't it giving me the right result?
Well, the complete code is about 3000 lines. I doubt it would help to post all of that. But I should have said it differently.
When I use your file, it's working. I don't get why it's not working within my EA.
The part I posted is everything, SAR_C is used in. So why isn't it giving me the right result?
Because your code is not allowing it to work as you think it should, in other words your code is broken. I can understand you not wanting to post your code, and I have no desire to trawl through 3000 lines of somone else's code, but without seeing more detail it's hard to give much specific help.
Add a Print() immediately after this line . . .
. . . is this line always called or is it part of a custom function ? or is it conditional on something else ? is your Print in the same function or a different function ?
Seems like I found the problem. Took me quite some time to figure out.
Thanks a lot for your help, angevoyageur and RaptorUK.
It was a mistake in the code. I forgot some brackets that made it circumvent the definition of the variable.