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

Reply
Old 12-22-2008, 01:55 PM   #1

Join Date: Jul 2008
Location: Kansas City
Posts: 8
Ignore this user

Thanks: 5
Thanked 0 Times in 0 Posts



Spread High/Low in TS

Does anyone know how to plot the high and low of a selected time frame (ie 5 min) of a spread in Tradestation? The default setting is a closing line.
Thanks
relizer is offline  
Reply With Quote
Old 12-22-2008, 10:44 PM   #2

Join Date: Feb 2007
Location: US
Posts: 314
Ignore this user

Thanks: 86
Thanked 204 Times in 89 Posts



Re: Spread High/Low in TS

If you are talking about the spread between two instruments in TS, just modify the input to the following instead of the default:

inputs: DataSeries1( High of data1 ), DataSeries2( Low of data2 ) ;

Code:
inputs: DataSeries1( High of data1 ), DataSeries2( Low of data2 ) ;

Plot1( DataSeries1 - DataSeries2, "SprdDiff" ) ;
You can also elaborate this study by calculating the largest spread of using 4 inputs (H data1, L data1, H data2, L data2).
thrunner is offline  
Reply With Quote
Old 12-23-2008, 12:54 PM   #3
zdo

Join Date: Nov 2007
Location: boonies
Posts: 1,178
Ignore this user

Thanks: 299
Thanked 298 Times in 212 Posts
Blog Entries: 104



Re: Spread High/Low in TS

Please clarify your specs.
Do you mean plot the highest ‘close’ and the lowest ‘close’ of the spread per bar for your timeframe?
Or do you mean plot the spread of the highs and plot the spread of the lows of each bar for your timeframe?
zdo is offline  
Reply With Quote
Old 12-23-2008, 04:11 PM   #4

Join Date: Jul 2008
Location: Kansas City
Posts: 8
Ignore this user

Thanks: 5
Thanked 0 Times in 0 Posts



Re: Spread High/Low in TS

Please clarify your specs.
Do you mean plot the highest ‘close’ and the lowest ‘close’ of the spread per bar for your timeframe?
Or do you mean plot the spread of the highs and plot the spread of the lows of each bar for your timeframe?

The Higest value and Lowest value for the time frame selected.
I would like to see a spread that looks like a bar chart instead of a line chart.
Thank you for your help.
relizer is offline  
Reply With Quote
Old 12-26-2008, 04:56 PM   #5
zdo

Join Date: Nov 2007
Location: boonies
Posts: 1,178
Ignore this user

Thanks: 299
Thanked 298 Times in 212 Posts
Blog Entries: 104



Re: Spread High/Low in TS

relizer,

Find code below... it was written in word not EL editor so I don't even know if it will verify... nonetheless it should get you started and maybe someone else who is in TS this weekend can help you fix it... don't really have much time to think about it now, so beware ...
ie read / use it as if it is concept / pseudo code...hth

Code:
inputs: DataSeries1(Close of data1), DataSeries2(Close of data2) ;

vars:
cs(0),	
os(0),
hs(0),
ls(0)
;

cs = (DataSeries1 - DataSeries2);
	
if barstatus(1) = 0 then begin
 //cs = (DataSeries1 - DataSeries2);
 os = cs;
 hs = cs;
 ls = cs;	

end; // if barstatus(1) = 0

if barstatus(1)= 1 or barstatus(1)= 2 then begin
 //cs = (DataSeries1 - DataSeries2);
 
 if cs > hs then
  hs = cs;

 if cs < ls {and cs > 0} then
  ls = cs;	

end; // if barstatus(1)= 1 or ...


Plot1(os, "os");  // set the style of this to Left Tick
Plot2(cs, "cs");  // set the style of this to Right Tick
Plot3(hs, "hs");  // set the style of this to Bar High
Plot4(ls, "ls");  // set the style of this to Bar Low
zdo is offline  
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[VSA] Volume Spread Analysis Part I TinGull Volume Spread Analysis 1559 06-22-2009 01:13 AM
Crack Spread Options james_gsx Options Trading Laboratory 4 07-03-2008 04:13 AM
Interpreting Bid/ask Spread Sparrow Technical Analysis 3 02-21-2008 05:21 AM
Volume Spread Analysis with TradeGuider Soultrader Scheduled Chat 15 03-31-2007 06:51 AM
Spread Analysis Question Soultrader Futures Trading Laboratory 4 01-29-2007 04:16 AM

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