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

Reply
Old 05-15-2007, 12:15 AM   #17

Join Date: Jan 2007
Location: san jose
Posts: 90
Ignore this user

Thanks: 0
Thanked 5 Times in 5 Posts

Re: TICK Coding Help

makes sense.. thanks..
nickm001 is offline  
Reply With Quote
Old 04-05-2009, 02:05 PM   #18
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: TICK Coding Help

I have added size and style option to this nice indicator

Code:
inputs: 
//	StartTime( 	0900	), 
//	EndTime( 	1030	),
	StartTime( SessionStartTime(1,1)), 
	EndTime( CalcTime(SessionStartTime(1,1),90)), 
	HL.Size( 	1 	),
	HL.Style( 	2 	),	
	HighColor( green),  
	LowColor( red) ; 
 
variables: 
	HavePrevLines( false ),  
	TLHigh( 0 ),  
	TLLow( 0 ), 
 	PeriodHigh( 0 ),  
	PeriodLow( 999999 ) ; 
 
if BarType <= 1 then { ie, if minute or tick bars } 
	begin 
//	if Date <> Date[1] then { ie, if new day } 	
	if CurrentSession(0) <> CurrentSession(0)[1] then { ie, if new session } 
		begin 
 
		{ truncate the previous lines if they exist } 
		if HavePrevLines then 
			begin 
			TL_SetEnd( TLHigh, Date[1], Time[1], PeriodHigh ) ; 
			TL_SetEnd( TLLow, Date[1], Time[1], PeriodLow ) ; 
			TL_SetExtRight( TLHigh, false ) ; 
			TL_SetExtRight( TLLow, false ) ; 
			end ; 
 
		{ re-initialize PeriodHigh,PeriodLow for the new day } 
		PeriodHigh = 0 ; 
		PeriodLow = 999999 ; 
 
		{ insert the new H,L lines and set their colors/extents } 
		TLHigh = TL_New( Date, Time, PeriodHigh, Date, Time, PeriodHigh ) ; 
		TLLow = TL_New( Date, Time, PeriodLow, Date, Time, PeriodLow ) ; 
		TL_SetColor( TLHigh, HighColor ) ; 
		TL_SetColor( TLLow, LowColor ) ; 
		TL_SetSize(  TLHigh  , HL.Size	);
		TL_SetSize(  TLLow	, HL.Size	);				
		TL_SetStyle(  TLHigh , HL.Style	);
		TL_SetStyle(  TLLow  , HL.Style	);		
		
		TL_SetExtLeft( TLHigh, false ) ; 
		TL_SetExtLeft( TLLow,false ) ; 
		TL_SetExtRight( TLHigh, true ) ; 
		TL_SetExtRight( TLLow, true ) ; 
 
		{ set flag } 
		if HavePrevLines = false then 
			HavePrevLines = true ; 
		end ; 
 
	if HavePrevLines = true then 
		begin 
		if StartTime <= Time and Time <= EndTime then  
			begin 
			if High > PeriodHigh then 
				begin 
				PeriodHigh = High ; 
				{ MUST reset TL end before resetting TL beginning in this case; if order  
				  reversed, begin will first be reset to right side of end, and become the  
				  new end; this will then again be reset by the subsequent statement; the  
				  original begin will not be reset at all. } 
				TL_SetEnd( TLHigh, Date, Time, PeriodHigh ) ; 
				TL_SetBegin( TLHigh, Date, Time, PeriodHigh ) ; 
				end ; 
			if Low < PeriodLow then 
				begin 
				PeriodLow = Low ; 
				{ MUST reset TL end before resetting TL beginning in this case; see  
				  above. } 
				TL_SetEnd( TLLow, Date, Time, PeriodLow ) ; 
				TL_SetBegin( TLLow, Date, Time, PeriodLow ) ; 
				end ; 
			end ; 
		end ; 
	end ;
aaa is offline  
Reply With Quote
The Following User Says Thank You to aaa For This Useful Post:
Tams (04-05-2009)
Old 04-05-2009, 08:01 PM   #19

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: TICK Coding Help

Quote:
Originally Posted by aaa »
I have added size and style option to this nice indicator
Good work!
You are learning fast.

Tams is offline  
Reply With Quote
Old 04-06-2009, 02:28 AM   #20
aaa

aaa's Avatar

Join Date: Jun 2008
Location: Switzerland
Posts: 443
Ignore this user

Thanks: 240
Thanked 283 Times in 136 Posts

Re: TICK Coding Help


Yes, We have good teachers here to help with this excellent trading software
But, It is only 2 tiny lines of Blue-Ray's script...
Anyway, Thanks for your compliment Tams.
Have a nice week trades.

Last edited by aaa; 04-06-2009 at 03:16 AM.
aaa is offline  
Reply With Quote

Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
TICK lows on the Russell TICK, not NYSE TinGull Trading Videos 7 10-28-2011 03:00 AM
TICK Hook's and TICK Candles Soultrader Technical Analysis 2 04-21-2007 04:22 PM
[VSA] Coding TinGull Coding Forum 2 03-18-2007 01:05 PM

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