PureBytes Links
Trading Reference Links
|
Hello,
Is it possible to write Alpha and Beta indicators for TS?
Maybe sb could help me to convert these MStock codes?
Best regards,
Krzysztof
{This formula calculates Beta which is a measure of volatility of one security
against another. This is typically used to measure the volatility of a stock
against an index like the S&P 500. A value greater than one indicates the stock
is more volatile than the index.
To plot Beta:
1. Open a chart of the desired security.
2. Drag the price plot of the index your are comparing, into the chart of the
security.
3. Drag this custom indicator from the QuickList and drop it onto the price plot
of the index.
Note, this formula is set to calculate beta over 21 periods. To change the time
periods replace each instance of 21 in the formula with the desired number of
periods.}
(( 21 * Sum( ROC( CLOSE,1,%) * ROC( INDICATOR,1,%),21))-
( Sum( ROC( CLOSE,1,%),21) * Sum( ROC( INDICATOR,1,%), 21)))
/
(( 21 * Sum( Pwr( ROC( INDICATOR,1,%),2),21)) -
Pwr( Sum( ROC( INDICATOR,1,%),21),2))
>>>>>>>>>>>>>>
{This formula calculates Alpha. The custom indicator named Beta is required to
plot Alpha. To plot Alpha:
1. Open a chart of the desired security.
2. Drag the price plot of the index you are comparing, into the chart of the
security.
3. Drag this custom indicator from the QuickList and drop it onto the price plot
of the index.
Note, this formula is set to calculate Alpha over 21 periods. To change the time
periods replace each instance of 21 in the formula with the desired number of
periods and also change the time periods in the Beta custom indicator.}
( Sum( ROC( CLOSE,1,%),21) -
( Fml( "Beta" ) * Sum( ROC( INDICATOR,1,%),21)))/21
|