|
|
|
|
|||||||
| Trading Indicators Post your custom trading indicators. If you download, remember to click INSTALL. |
![]() |
|
|
LinkBack (26) | Release Tools | Display Modes |
|
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; |
|
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 |
|
By
ant
on
08-13-2007, 11:03 PM
|
|||||||||||||||
|
Re: "Market Delta" Footprint for TradeStation
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. |
|||||||||||||||
|
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.
|
|
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. |
|
|
|
By
MC
on
12-19-2007, 06:19 PM
|
|||||||||||||||
|
Re: "Market Delta" Footprint for TradeStation
I installed it but don't see anything on a 15 minute chart, is there something I'm messing up on? Thanks Mike |
|||||||||||||||
|
By
Blu-Ray
on
12-19-2007, 06:25 PM
|
|
Re: "Market Delta" Footprint for TradeStation
|
![]() |
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 | |
| MarketDelta | This thread | Refback | 12-06-2006 03:10 PM | |
| Currently Active Users Viewing This Release: 1 (0 members and 1 guests) | |
| Release Tools | |
| Display Modes | |
|
|