Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 01-24-2009, 04:29 AM   #1

Join Date: Nov 2008
Location: sparta
Posts: 3
Ignore this user

Thanks: 3
Thanked 0 Times in 0 Posts

TS Help

2 functions verify no problem.

Function: haOpen
haOpen = 0.5 * ( AvgPrice + haOpen[1] ) ;

Function: haC
haC = 0.25 * ( AvgPrice + haOpen +
MaxList( High, haOpen )+ Minlist( Low, haOpen ) ) ;

Then I try

Indicator: Zero-Lagging TMA

inputs:
Price( TypicalPrice ),
Period( 55 ) ;
variables:
TMA1( 0 ),
TMA2( 0 ),
Difference( 0 ),
ZeroLagTMA( 0 ) ;
TMA1 = TEMA( Price, Period ) ;
TMA2 = TEMA( TMA1, Period ) ;
Difference = TMA1 - TMA2 ;
ZeroLagTMA = TMA1 + Difference ;
if CurrentBar > 4 * Period then
Plot1( ZeroLagTMA, "ZeroLagTMA" ) ;



TEMA ,word not recognized by TS.

Anyone have any ideas


Many Thanks
gtnicosia is offline  
Reply With Quote
Old 01-24-2009, 05:35 AM   #2

Join Date: Nov 2006
Location: N/A
Posts: 612
Ignore this user

Thanks: 62
Thanked 294 Times in 177 Posts

Re: TS Help

TEMA is a function which is not included and you will have to create it. If you create a function with the name of TEMA with the code below this should compile. Disclaimer, I do not use this, but I think the code is correct for TEMA. Please verify and confirm for yourself that it is.

Code:
{Function: TEMA}
INPUTS:  PRICE(NumericSeries),LENGTH(NumericSimple);

TEMA =  (3 * XAVERAGE(PRICE,LENGTH)) - (3 * XAVERAGE(XAVERAGE(PRICE,LENGTH),LENGTH)) + 
	(XAVERAGE(XAVERAGE(XAVERAGE(PRICE,LENGTH),LENGTH),LENGTH));
sevensa is offline  
Reply With Quote
Old 01-25-2009, 06:28 AM   #3

Join Date: Nov 2008
Location: sparta
Posts: 3
Ignore this user

Thanks: 3
Thanked 0 Times in 0 Posts

Re: TS Help

It works perfect.


Thank you so much !!!!!!!
gtnicosia is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


All times are GMT -4. The time now is 12:22 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.