kbellare replied:
Please help - in my TSF crossing WMA(TSF) strategy, I tried following the suggested method (code below) of building the TSF and WMA "hybrid" indicators using formulas (I'm using WAMA instead of KAMA as its formula is known and easy) and running it on 15min or 10min bars - but run into 2 strange issues (can't figure out where the bug is)
1) TSF(compressed price bars) displays as 0 in the price chart after i've restored the scale, whereas WMA(TSF(compressed price bars)) displays correctly and tracks the price - even WMA should fail if TSF is failing.
2) I've used this TSF formula (below) to build the Hybrid-TSF indicator as it was listed as an easier alternative in the community source code (file attached), but not sure if LinearReg.Series and LinearRegSlopeSeries will be found in the libraries.
tsf[bar] = LinearReg.Series(partialPr, TSFPeriod.ValueInt)[bar] + (LinearRegSlope.Series(partialPr, TSFPeriod.ValueInt)[bar] * 0);
3) Please check if my logic for building the hybrid-TSF and hybrid-WMA indicators - it was quite complicated to pull data-points from 2 different series, but difficult to validate.
CODE:
Please log in to see this code.