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

Reply
Old 08-31-2011, 12:24 AM   #1

xioxxio's Avatar

Join Date: May 2011
Posts: 130
Ignore this user

Thanks: 33
Thanked 27 Times in 19 Posts

Tradestation Help

I have taken this code from Tams, does anyone know why when the High=high[1] and the Low=Low[1] it does not draw lines on both the high to high and low to low.

Thanks

Variables:

id.tl (0),
id.txt (0),
old_id(0),
ccc(0),
id.tl.top(0),
id.tl.bot(0),
inside(false),
insidebar(false);



if Low = Low[1] then
begin
id.tl.top = tl_new( date, time[1], LOW[1], date, time, LOW );
end
else


if high = high[1] then
begin
id.tl.top = tl_new( date, time[1], high[1], date, time, HIGH );
end

else


if high = high[1] and low = low[1] then
begin
id.tl.bot = tl_new( date, time[1], LOW[1], date, time, LOW );
id.tl.top = tl_new( date, time[1], HIGH[1], date, time, high );


end


Also does anyone know how to have permanent straight lines in the volume area. I keep having to redraw them. ie straight lines at 2000, 5000,7000,9000 and 19000
xioxxio is offline  
Reply With Quote
Old 08-31-2011, 12:35 AM   #2

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: Tradestation Help

Please use code tag. (the # button in the message window)
It is difficult to read codes without tags.
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 08-31-2011, 12:37 AM   #3

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: Tradestation Help

Quote:
Originally Posted by xioxxio »
...
Also does anyone know how to have permanent straight lines in the volume area. I keep having to redraw them. ie straight lines at 2000, 5000,7000,9000 and 19000
just use PLOT


eg.

Code:
plot100( 2000, "2000");
plot101( 5000, "5000");
plot102( 7000, "7000");
plot103( 9000, "9000");
plot104( 19000, "19000");
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
xioxxio (08-31-2011)
Old 09-01-2011, 09:29 PM   #4

xioxxio's Avatar

Join Date: May 2011
Posts: 130
Ignore this user

Thanks: 33
Thanked 27 Times in 19 Posts

Re: Tradestation Help

#
if Low = Low[1] and high = high[1] then
begin
tl_new( date, time[1], LOW[1], date, time, LOW );
tl_new( date, time[1], high[1] , date, time, HIGH );
end;

if Low = Low[1] then
begin
tl_new( date, time[1], LOW[1], date, time, LOW );
end;

if high = high[1] then
begin
tl_new( date, time[1], high[1] , date, time, HIGH );
end;
#

Does anyone know how to make the colours of the lines that are drawn blue? Thanks
xioxxio is offline  
Reply With Quote
Old 09-01-2011, 10:02 PM   #5

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: Tradestation Help

nice try. ;-)
code tag is the # button at the top of the message window frame.

Code:
if Low = Low[1] and high = high[1] then
begin
	tl_new( date, time[1], LOW[1], date, time, LOW );
	tl_new( date, time[1], high[1] , date, time, HIGH );
end;	

if Low = Low[1] then
begin
	tl_new( date, time[1], LOW[1], date, time, LOW );
end;	

if high = high[1] then
begin
	tl_new( date, time[1], high[1] , date, time, HIGH );
end;
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 09-01-2011, 10:08 PM   #6

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: Tradestation Help

Quote:
Originally Posted by xioxxio »
...
Does anyone know how to make the colours of the lines that are drawn blue? Thanks

the keyword TL_NEW does 2 things:

1. create a trendline,
2. assign a serial number to the trendline.

When you do modifications to a trendline, you can use this serial number to identify the line you want to modify.


you can use a variable to capture the trendline serial number:

Code:
var:
myline(0);

myline = tl_new( date, time[1], LOW[1], date, time, LOW );

to modify the trendline, add this:

Code:
TL_setcolor( myline, blue):
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 09-01-2011 at 11:07 PM.
Tams is offline  
Reply With Quote
The Following 2 Users Say Thank You to Tams For This Useful Post:
TIKITRADER (09-02-2011), xioxxio (09-01-2011)

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
CBOT Market Profile® for TradeStation 2000i and TradeStation 8 xioxxio Market Profile 0 08-13-2011 01:27 AM

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