"Market Delta" Footprint for TradeStation - Page 2 - Traders Laboratory
Forum Guidelines | Contact Us
Home

Go Back   Traders Laboratory > Trading Resources > Trading Indicators

Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL.


Comment
 
LinkBack (26) Release Tools
 
Old 10-03-2006, 08:21 PM
ant's Avatar
ant ant is offline
ant has no status.

 
Join Date: Sep 2006
Posts: 293
Thanks: 0
Thanked 3 Times in 1 Post
This member is the original thread starter. "Market Delta" Footprint for TradeStation

Market Delta is 3rd party software that provides interesting ways of viewing bid/ask information. This information could be useful for analyzing market behavior as price approaches a key support/resistance level.

For those that use TradeStation, I have created a simulation of Market Delta. Note that TradeStation provides a snapshot of the bid/ask so it won't be accurate most of the time. Therefore, I have provided an option in this analysis technique to use upticks and...
Attached Images
File Type: gif ES.GIF (25.4 KB, 1457 views)
File Type: gif ES-MarketDelta.gif (35.0 KB, 1753 views)
Attached Files
File Type: eld MarketDelta.ELD (7.8 KB, 981 views)

Reply With Quote
  #10 (permalink)  
By anarcho on 07-07-2007, 08:34 PM
Re: "Market Delta" Footprint for TradeStation

Is there any way to convert this ELD into EFS to use in esignal?
Reply With Quote
  #11 (permalink)  
By torero on 07-08-2007, 03:38 AM
Re: "Market Delta" Footprint for TradeStation

Double-check to see that this line is not written twice:

"errLine 23, errColumn 2, errLineEnd 23, errColumnEnd 2"

And the end of each line should have a semicolon ";".
Reply With Quote
  #12 (permalink)  
By O66 on 07-15-2007, 05:04 PM
Re: "Market Delta" Footprint for TradeStation

had the same error in compiling in MultiCharts, i replaced i to iz now its compiling fine:



inputs:
Threshold1( 150 ),
Threshold2( 300 ),
Threshold3( 600 ),
DisplayDelta( false ),
Type( 1 ), // 1 = Use Upticks/Downticks, 2 = Use Bid/Ask
BidAskArraySz( 1000 );

variables:
TickSize( MinMove / PriceScale ),
PriceAtIndex( Open ),
BaseIndex( BidAskArraySz/2 ),
Red1(RGB(255,185,185)),
Red2(RGB(255,128,128)),
Red3(RGB(255,0,0)),
Red4(RGB(128,0,0)),
Green1(RGB(210,255,210)),
Green2(RGB(125,255,125)),
Green3(RGB(0,255,0)),
Green4(RGB(0,128,0)),
iz( 0 );

variables:
intrabarpersist Price( 0 ),
intrabarpersist MyVol( 0 ),
intrabarpersist VolTmp( 0 ),
intrabarpersist LastTick( 0 ),
intrabarpersist MyCurrentBar( 0 ),
intrabarpersist Index( 0 ),
intrabarpersist BidAskDelta( 0 ),
intrabarpersist xDelta( 0 ),
intrabarpersist TextString(""),
intrabarpersist MyUpTicks( 0 ),
intrabarpersist MyDownTicks( 0 );

Arrays:
intrabarpersist Bid[](0),
intrabarpersist Ask[](0);

Array_SetMaxIndex( Bid, BidAskArraySz );
Array_SetMaxIndex( Ask, BidAskArraySz );

if (Type = 1 or Type = 2) and LastBarOnChart and BarType < 2 then
begin
MyVol = Ticks;
PriceAtIndex = Open;

if CurrentBar > MyCurrentBar then
begin
VolTmp = 0;
MyCurrentBar = CurrentBar;
MyUpTicks = 0;
MyDownTicks = 0;

for iz = 0 to BidAskArraySz - 1
begin
Bid[iz] = 0;
Ask[iz] = 0;
end;
end;

Index = BaseIndex + (Close - PriceAtIndex) / TickSize;

if InsideBid < InsideAsk then
begin
if Type = 1 then
begin
// Use Upticks/Downticks
if DownTicks <> MyDownTicks then
Bid[Index] = Bid[Index] + MyVol - VolTmp
else if UpTicks <> MyUpTicks then
Ask[Index] = Ask[Index] + MyVol - VolTmp
else
begin
if Close <= LastTick then
Bid[Index] = Bid[Index] + MyVol - VolTmp
else
Ask[Index] = Ask[Index] + MyVol - VolTmp;
end;
end
else
begin
// Use Bid/Ask
// Warning: TradeStation provides snapshot of bid/ask
if Close <= InsideBid then
Bid[Index] = Bid[Index] + MyVol - VolTmp
else if Close >= InsideAsk then
Ask[Index] = Ask[Index] + MyVol - VolTmp
else
begin
// Last tick was between bid/ask
if Close <= LastTick then
Bid[Index] = Bid[Index] + MyVol - VolTmp
else
Ask[Index] = Ask[Index] + MyVol - VolTmp;
end;
end;
end;

MyUpTicks = UpTicks;
MyDownTicks = DownTicks;
VolTmp = MyVol;
LastTick = Close;

xDelta = 0;
Price = Low;

while Price <= High
begin
Index = BaseIndex + (Price - PriceAtIndex) / TickSize;
TextString = NumToStr(Bid[Index],0) + " x " + NumToStr(Ask[Index],0);
Value99 = Text_New(Date, Time, 0, " ");
Text_SetString(Value99, TextString);
Text_SetLocation(Value99, Date, Time, Price);
Text_SetStyle(Value99, 1, 1);

BidAskDelta = Ask[Index] - Bid[Index];
if BidAskDelta > Threshold3 then
Text_SetColor(Value99, Green4)
else if BidAskDelta > Threshold2 then
Text_SetColor(Value99, Green3)
else if BidAskDelta > Threshold1 then
Text_SetColor(Value99, Green2)
else if BidAskDelta >= 0 then
Text_SetColor(Value99, Green1)
else if BidAskDelta < -Threshold3 then
Text_SetColor(Value99, Red4)
else if BidAskDelta < -Threshold2 then
Text_SetColor(Value99, Red3)
else if BidAskDelta < -Threshold1 then
Text_SetColor(Value99, Red2)
else
Text_SetColor(Value99, Red1);

xDelta = xDelta + BidAskDelta;

Price = Price + TickSize;
end;

if DisplayDelta = true then
begin
Value99 = Text_New(Date, Time, 0, " ");
Text_SetString(Value99, NumToStr(xDelta, 0 ));
Text_SetLocation(Value99, Date, Time, Low - TickSize);
Text_SetStyle(Value99, 1, 1);

if xDelta >= 0 then
Text_SetColor(Value99, Green)
else
Text_SetColor(Value99, Red);
end;
end;
Reply With Quote
  #13 (permalink)  
By david_sa on 08-13-2007, 12:07 PM
Re: "Market Delta" Footprint for TradeStation

Hi, ant:
very much interested in your code. I used to be a programmer and dba on unix platform for a few years and is trading full time now. I want to code some programs, such as the one you posted. How do I get started? any book you recommend for me to read? I have not coded anything web-based.

thanks
Reply With Quote
  #14 (permalink)  
By ant on 08-13-2007, 11:03 PM
Re: "Market Delta" Footprint for TradeStation

Quote:
View Post
Hi, ant:
very much interested in your code. I used to be a programmer and dba on unix platform for a few years and is trading full time now. I want to code some programs, such as the one you posted. How do I get started? any book you recommend for me to read? I have not coded anything web-based.

thanks
Hi David,

I'm assuming you are refering to developing TradeStation indicators... As a programmer, I think you'll be able to pick up EasyLanguage fairly easily so I would suggest taking TradeStation indicators that already exist and review how they are written. Learn how to use arrays, draw trendlines, print text, create functions, read and write to a file, how to process data on every tick, etc. Take a look at the online TradeStation User Guide. There are a lot of TS indicators around so just take one that you think would add value to your trading and modify it for the learning experience. I would also learn about the TradeStation API (EasyLanguage Extension Software Development Kit - a reference guide) so that you can write DLLs for TS. It's pretty straightforward I think. Other stuff you can learn are how to use global variables and the ADE. Global Variables allow you to pass data between windows in TS. Do a search at the TS Forum for more information. This is how I started out with EasyLanguage. Hope this helps.
Reply With Quote
  #15 (permalink)  
By MarketMole on 08-14-2007, 01:48 PM
Re: "Market Delta" Footprint for TradeStation

If you're going full algo trading however, that is, not wanting to sit in front of a rack of monitors all day long, then TS may not be your best bet. Or if you want to trade the futures TS is limiting. There are systems out there which will allow you to code up strats that will do pairs and composites trading, venue blending trading, etc. But if you're just looking to trade using your brain as a probability engine then TS or eSignal work well enough.
Reply With Quote
  #16 (permalink)  
By zdo on 12-19-2007, 12:51 PM
Re: "Market Delta" Footprint for TradeStation

Here is a modification of Ant's MarketDelta 'footprint' code that implements a threshold free, dynamic coloring gradient for the balance at each price.
The coloring algorithm serves as a pretty good template for auto-coloring of other indicators, etc. See comments in code.
Attached Files
File Type: eld PBZMARKETDELTAAUTOCOLOR.ELD (12.2 KB, 164 views)
Reply With Quote
  #17 (permalink)  
By BlowFish on 12-19-2007, 05:18 PM
Re: "Market Delta" Footprint for TradeStation

Nice to see someone doing maintenance and updates on Ants code. I have some footprint code that does auto shading but it seems to look 'kind of pale'. I'll give this a spin sometime

Thanks to both,
Reply With Quote
  #18 (permalink)  
By MC on 12-19-2007, 06:19 PM
Re: "Market Delta" Footprint for TradeStation

Quote:
View Post
Here is a modification of Ant's MarketDelta 'footprint' code that implements a threshold free, dynamic coloring gradient for the balance at each price.
The coloring algorithm serves as a pretty good template for auto-coloring of other indicators, etc. See comments in code.
Thanks for doing this, is there anything special I need to do on the chart?
I installed it but don't see anything on a 15 minute chart, is there something I'm messing up on?

Thanks
Mike
Reply With Quote
  #19 (permalink)  
By Blu-Ray on 12-19-2007, 06:25 PM
Re: "Market Delta" Footprint for TradeStation

Quote:
View Post
Thanks for doing this, is there anything special I need to do on the chart?
I installed it but don't see anything on a 15 minute chart, is there something I'm messing up on?

Thanks
Mike
I haven't tested it yet, but it should only work in real time. (No Historical data).

Cheers

Blu-Ray
Reply With Quote
Comment



LinkBacks (?)
LinkBack to this Thread: http://www.traderslaboratory.com/forums/f46/market-delta-footprint-for-tradestation-516.html
Posted By For Type Date
MarketDelta This thread Refback 08-18-2007 03:07 PM
MarketDelta This thread Refback 07-27-2007 08:00 AM
AmiBroker Fan This thread Refback 06-23-2007 08:04 AM
MarketDelta This thread Refback 06-14-2007 09:38 AM
MarketDelta This thread Refback 05-25-2007 07:29 PM
TS SUPPORT :: View topic - Market Delta This thread Refback 05-14-2007 07:53 PM
MarketDelta This thread Refback 05-10-2007 06:32 AM
AmiBroker Fan This thread Refback 04-29-2007 01:22 AM
TS SUPPORT :: View topic - Market Delta This thread Refback 04-24-2007 09:19 AM
TS SUPPORT :: View topic - Market Delta This thread Refback 04-15-2007 05:59 AM
Latest posts of: Joe This thread Refback 04-13-2007 02:17 PM
TS SUPPORT :: View topic - Market Delta This thread Refback 04-13-2007 10:30 AM
TS SUPPORT :: View topic - Market Delta This thread Refback 04-12-2007 09:24 AM
TS SUPPORT :: View topic - Market Delta This thread Refback 04-10-2007 11:14 PM
MarketDelta This thread Refback 04-10-2007 09:53 PM
MarketDelta This thread Refback 04-07-2007 11:00 PM
TS SUPPORT :: View topic - Market Delta This thread Refback 04-02-2007 12:04 PM
TS SUPPORT :: View topic - Market Delta This thread Refback 04-02-2007 09:56 AM
TS SUPPORT :: View topic - Market Delta This thread Refback 03-19-2007 07:09 PM
AmiBroker Fan This thread Refback 03-07-2007 04:22 PM
MarketDelta This thread Refback 02-27-2007 02:26 AM
AmiBroker Fan This thread Refback 02-15-2007 08:36 AM
MarketDelta This thread Refback 02-03-2007 09:10 AM
MarketDelta This thread Refback 12-27-2006 03:56 PM
MarketDelta This thread Refback 12-23-2006 09:10 AM