Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I would say you should use print statements to see the actual values. My guess is what you are plotting on the chart (from an indicator) is not the same as what is in the strategy.
print(date",",",time,",",asxAvg2,",",asxAvg2[1]); //code not checked
Are you 100% positive that both calculations start on the exact same bar? With an indicator the "barsback" is usally autodetected, but you have to set it in a strategy.
This sort of thing will matter if your calculations are dependent on the starting point. I'm guessing AccumSwingIndex is starting point dependent.
That is why I suggested using print statement. Did you try it? What does it say?
I guess I haven't gotten that far in my studies. I don't know how to use a print statement to verify a strategy, or how to set bars back. Thank you for pointing me in a direction.
I removed the strategy and then reapplied it and it worked, so your initial thought that the settings between the indicator and strategy were out of synch must have been correct.
Your prompting helped me learn how to use the Print Log (and associated formatting).