[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Composite Code?



PureBytes Links

Trading Reference Links

> You can weight various indicators by multiplying by the percent you want
> each to bear in the final indicator.
> Example:
> indicator = RSI(7)*.50  +  ROC(9)*.25  +  Stochastic(14)*.25
> This would give you 50% influence of RSI, 25% of ROC and 25% of
> stochastic. 

Only if the indicators you're combining have the same range.  In the 
example you used, all those indicators range between 0 and 100, so it 
works out.  

If the indicators have different ranges, you'll have to scale them to 
a common range.  E.g. if you know your indicator goes from -2 to 2, 
you could add it into the above mix by scaling it like so:   
25*(MyInd + 2) .  That scales it to a 0-100 range.  Then you can 
multiply the scaled value by whatever percentage you want to use.

If you don't know the indicator's range ahead of time, you could use 
something like Highest(High)-Lowest(Low) and Average(Low) to get the 
typical recent range & base of the indicator, then plug those values 
into a similar scaling calculation.

Gary