APO/PPO Lookback bug.
Brought to you by:
fortier
E-mail from Andrew Atkinson:
Assuming the user uses the Lookback value to size the
output array, as the Lookback function uses the
optInSlowPeriod value, this results in an undersized
array.
I resolved in Java by choosing the lowest value between
optInSlowPeriod and optInFastPeriod, but not being
familiar with APO/PPO im not sure if this results in
incorrect output.
Logged In: YES
user_id=1123
Thanks Andrew.
Fix is now in CVS and will be part of release 0.1.4
The bug will happen only for user that call PPO/APO with
optInSlowPeriod < optInFastPeriod
Normally, slow period is expected to be >= than fast period.
Fix was to change the Lookback functions as follow:
return TA_MA_Lookback(
max(optInSlowPeriod,optInFastPeriod), optInMAType );
ta_regtest has been enhance to keep an eye on this.
\Mario
Contributed patch, already applied. TA-Lib has moved to GitHub and this SourceForge tracker is retired.
This ticket carried a contributed patch (
po_lookback.patch.txt) and was resolved asclosed-fixedon SourceForge in 2005. It is accounted for in the final SourceForge review: https://github.com/TA-Lib/ta-lib/issues/30No further support is provided on SourceForge. Please send patches as pull requests on GitHub instead:
Thank you for the contribution.