- Neither one will work if you don't pass the array.
- We have no idea if it calculates only the asked for value or caches all values.
- It takes 20 ms and bars take minutes, faster is irrelevant.
Oops. I forgot to pass the array. I guess I meant to ask if we need to count the whole array, of just the X amounts of bars you want to take where X is the period we specified. Do they give the same answers?
I'm not too concerned about the speed in live, but running an optimization pass with thousands of parameters makes me want to make sure I have everything as quick as possible.
bplturner: , but running an optimization pass with thousands of parameters makes me want to make sure I have everything as quick as possible.
Don't do per tick what you can do per bar. Don't do per bar what you can do when price reaches a condition.

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
Hello,
Is there any difference between
AND
I don't see the point in calculating the standard deviation on the whole array if I can calculate it on just a segment equal to the moving average length. It seems like the second should be much faster and give the same answer.
Am I missing something here?