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

Re: TAM



PureBytes Links

Trading Reference Links

Hello Ian,

Sunday, June 29, 2003, 5:37:00 PM, you wrote:

IW> Did anyone read the Time And Money Charts feature in May's TAS&C (page 
IW> 29)?

IW> Wondering if anyone did or possibly would be prepared to convert the 
IW> Metastock code there into TS format.

IW> Ian

Here it is
TIME AND MONEY
The EasyLanguage code presented here reproduces the time and money charts described in Stuart Belknap's May 2003 article in STOCKS & COMMODITIES. 
The time and money chart displays a simple moving average and six volatility bands around price, as defined in the article. Since TradeStation can show a maximum of four plots in a single indicator, we broke the code into two pieces: a ChanLinesHi indicator and a ChanLinesLo indicator. 
Also displayed is the code for Belknap's volatility index as discussed in the article, and finally, the stochastic momentum indicator. 
  
{ "T&M - Volatility Indicator"
from "Time and Money Charts" by Stuart Belknap }
inputs:   Period( 25 ) ;
variables:
yom( 0 ),
avyom( 0 ),
 varyyom( 0 ),
 som( 0 ),
 sigom( 0 ),
 HalfPeriod( 0 ) ;
HalfPeriod = Period /2 ;
yom = 100 * (Close - Average( Close, Period ) /
 Average( Close, Period ) );
avyom = Average( yom, 50 ) ;
varyyom = Average( yom*yom, 50 ) - ( avyom*avyom ) ;
som = squareroot( varyyom[ -HalfPeriod ] ) ;
sigom = Average( som, Period ) ;
plot1( sigom, "som" ) ;
~~~~~~~~~~~~~~~~~~~~~~
{ "T&M ? Stochastic Momentum Indicator"
from "Time and Money Charts" by Stuart Belknap }
inputs:
 Length( 12),
 Smooth1( 25 ),
 Smooth2( 2 ) ;
value1 = 100 * ( XAverage( XAverage( Close - (.5 *
 ( Highest( High, Length ) + Lowest( Low, Length ) ) ),
 Smooth1), Smooth2) /
 (.5 * XAverage( XAverage( Highest( High, Length )-
 Lowest( Low, Length ), Smooth1 ), Smooth2 ) ) ) ;
plot1( value1, "StochMom") ;
plot2( Average( value1, Smooth1 ), "SM Avg" ) ;
plot3( 50, "+50" ) ;
plot4( -50, "-50" ) ;
~~~~~~~~~~~~~~~~~~~~~
{ "T&M - ChanLinesHi Indicator"
from "Time and Money Charts" by Stuart Belknap }
Plots the minor term average and the three upper
channel lines }
inputs: Period( 25 ) ;
variables:
 Arm( 0 ),
 Level1( 0 ),
 Level2( 0 ),
 Level3( 0 ) ;
Arm = Average( C, Period ) ;
Level1 = (1 + (1.0 * 5/100 ) ) * Arm ;
Level2 = (1 + (2.0 * 5/100 ) ) * Arm ;
Level3 = (1 + (3.0 * 5/100 ) ) * Arm ;
plot1( Level1, "+L1" ) ;
plot2( Level2, "+L2" ) ;
plot3( Level3, "+L3" ) ;
plot4( Arm, "Arm" ) ;
~~~~~~~~~~~~~~~~~~~~~~~
{ "T&M - ChanLinesLo" Indicator"
from "Time and Money Charts" by Stuart Belknap }
Plots the minor term average and the three lower
channel lines }
inputs: Period( 25 ) ;
variables:
 Arm( 0 ),
 Level1( 0 ),
 Level2( 0 ),
 Level3( 0 ) ;
Arm = Average( C, Period ) ;
Level1 = (1 - (1.0 * 5/100 ) ) * Arm ;
Level2 = (1 - (2.0 * 5/100 ) ) * Arm ;
Level3 = (1 - (3.0 * 5/100 ) ) * Arm ;
plot1( Level1, "-L1" ) ;
plot2( Level2, "-L2" ) ;
plot3( Level3, "-L3" ) ;
plot4( Arm, " Arm " ) ;


-- 
Best regards,
 Roger                            mailto:mailrs@xxxxxxxxxx






  • References:
    • TAM
      • From: Ian Waugh