1 / 7

Trading Day Prep ( code.google/p/trade-manager/ )

Trading Day Prep ( http://code.google.com/p/trade-manager/ ). 9:10am Pre-mkt gap scan, added any before market earnings/guidance stocks to watch list. 9:15am Check Interactive Brokers TWS gap reports Most Active reports , % Gainers, % Losers

Download Presentation

Trading Day Prep ( code.google/p/trade-manager/ )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Trading Day Prep(http://code.google.com/p/trade-manager/ ) • 9:10am Pre-mkt gap scan, added any before market earnings/guidance stocks to watch list. • 9:15am Check Interactive Brokers TWS gap reports Most Active reports , % Gainers, % Losers • 9:20 Grade the gappers into a long short list by tier. • 9:25 Setup up Long/Short gapers on 1min thumb charts in eSignal • 9:28 Check for any last minute gaps • 9:50am Switch 2min main chart white to 1min chart • 9:50 re check Earnings/Guidance gap list. Replace any gappers with better choices. • 4:00pm Create gap carry over list. Setup earnings After hrs/B4 Open minder.

  2. Is the stock gapping against the market (short term). i.e. If the market (SPY,QQQ) is gapping > +/- 0.5% then Long gappers need excellent patterns. Short gappers are preferred. • Is the stock gapping against its long term trend. i.e. Professional gap • Is the stock gapping over/under R/S. Short term pattern. Note stocks gapping into S/R on 60/daily usually fail. • Does the stock have a clear void. We look for 3R on entry. • Is the stock gapping over a +/-WRB or pivot. Short term pattern • Amount of gap not to excessive into the void. i.e. +/- 3-4% for $20-$60 is ok 6-10% excessive, +/-10% Mega look for novice play if gapping to S/R. • Is the gap Earnings/Guidance related. On these days the volume will be +4X normal so it has the fuel to run. • Remember this is a subjective analysis. But tier 1 gappers have a 70-80% batting average and so entries in the first 5min should be allowed in your plan. Grading Gappers

  3. Implemented Features • Historical data on any TWS supported time frame. 30sec-Daily download from TWS and stored. Trade position time frame is defined by UI for each contract traded, stocks & futures supported. Historical data download from Yahoo Finance. • Charts (candle sticks & volume) using JFreeCharts updates every 5secs, featuring 8/20MA(config), Vwap, Pivots e.t.c. Support for any derived indicator. Save and Print in png format. Roll-up from traded timeframe, see dropdown on chart tab. • Back testing Strategies supported. Ability to reassign strategies. Assign indicators to strategies all via UI • Manual order creation and transmission to TWS. • Portfolio Summary/Detail reports with batting and simple sharp ratio calculations. Click thru to charts. Export reports in csv format. • Support for Strategies written in java. Separated strategies for entry and management (optional) of positions. Strategies compiled at runtime and are stored and versioned. Strategies are fired every 5sec or when the Bid moves outside the High/Low range of the forming candle. • Import symbols in csv format for daily setup and back testing. • Configurable trade parameter supported i.e. STPLMT amts, roll up/down on whole/half number e.t.c all via UI and generic table support for future parms. • Time-zone support for local vs market time-zone. • Account balances i.e. avail margin/cash/realized/unrealized P/L available to strategies for position sizing & profit taking. • Support for Linux/Windows.

  4. Sample 5min Side Bar strategy • Buy over the 5min high (+1c) using the 5min low (-1c) as stop. Round shares to nearest X based on Risk value (see entry limit table). • Entry must be before 10:00am reversal time. • If 5min low broken before trade is entered no entry allowed. This prevents gap fill type entries. • Stop cannot be more than X% of stock price i.e. if stock price is $100 then stop must be less or equal to $2, 2% (see entry limits table) • Each tails on the entry bar (i.e. 1st bar of day) cannot be more than 2X of the body of the bar i.e if the body of the bar is 25c tails cannot be more than 50c i.e no entries of narrow bars (NB). This will prevent all PBS entries where a first green bar on the 1 or 2 min then a few pull back bars as this will leave a decent topping tail on the 5 min. • First 5min bar close must be in the direction of the trade. i.e. green for long play. This will prevent all PBS in the direction of the gap fill. E.g. two red bars and a bottoming tail bar into the gap fill on 1min. • If the High/Low of the bar is a whole/half number ($1 or 50c) then entry/stop will be 1c (# of cents is defined by stock price see entry limit table) over the whole/half number and stop will be 1c under the whole/half number. • Stop to breakeven on any open trade at 10am. This will prevent full losses on stocks that PB. This will exit positions that have stalled, note these usually stop. • Exit 1/2 the position at 3R and move stop to breakeven. • Trail the back half bar by bar using Heilkin-Ashi bars onthe 5min chart. Use current bar -2 i.e if current bar starts at 10:05 stop will be at the low of the 9:55 bar. If we have hit target this strategy only kicks in when the bar -2 close is over the 3R tgt. Otherwise hold position till stopped or close. • Trades still open at 15:55:00 will be closed out. • Trade size = $Risk Amount/ entry price – stop price where Risk amount is fixed.

  5. Trading day Tab Strategies Tab Chart/Contract Tab Portfolio Tab Configuration Tab Trade Manager Architecture. • Events • Position opened • Position closed • Errors e.t.c UI Components i.e. Java Swing GUI Main UI Controller Broker Interface IB TWS Broker Implementation Strategy Service (Thread worker) IB TWS Client & Backtest Interface Socket Port 4796 Submit, update, cancel orders Inference Engine (Drools) Trade Manager Service Orders & Mkt Data, Historical data. Hibernate Persistent Layer (DB pool & session mgmt) DB to store: Trades, Orders, executions Mkt data (candles on period basis) Account info, Indicator settings, Trade Parameters e.t.c. MySQL 5.2 Database

  6. Manages 9:35 O=92.03, C=91.34, H, L, e.t.c Ver=2 FiveMinSide{….} 04/02/2012 3R All Or Nothing 9:40 O=92.03, C=91.34, H, L, e.t.c Ver=1 FiveMinSide{…} 04/03/2012 5min side gap bar Database Layout. Candle Rule Tradingday Strategy AAPL IBM Side=BOT, isOpen=Yes, totVal=$9134 Tradestrategy (Trading Tab) Contract Trade • UI Tabs maintain • Tradingday Tab • Tradestrategy • Tradingday • Contact Tab • Trade • TradeOrder • Config Tab • Strategy • EntryLimits • CodeAttribute • CodeValue • TradingLog • IndicatorSeries • Strategy Tab • Rule TradeOrder Fill TradingAccount TradeOrder Cash acct #XU12344 Sell 100shrs STP $91.34 Buy 50shrs LMT $92.34 Test acct #DU12345 Buy 100shrs LMT $92.34 Buy 50shrs LMT $92.34

  7. Strategies Rule Java code versioned and stored in DB. Deployed & compiled to file system at runtime. Strategy • Strategy and Strategy Managers • Java code, future Drools inference engine. • Strategies start once a contract has been defined to be traded and Run Strategy or Test Strategy is started. • Event driven by candles updates 5sec or by bar timeframe. • Functions to create, update, cancel orders. • Strategy is where you define logic to enter the trade. • Strategy Manager is where you define logic to manage an open position i.e. stops & targets • Strategy has a Strategy manager • Each strategy must have one manager • The manager starts once the open position is filled. Manages • Setup • Create the strategy - Config Tab. • Create strategy manger - Config Tab. • Define indicators used by the Strategy – Config Tab. • Create strategy class – Strategy Tab. • Create strategy manager class – Strategy Tab. • Compile and deploy strategies – Strategy Tab. • Identify contacts to test & download candle data – Tradingday Tab • Back test strategy using back test feature – Tradingday Tab. Strategies use Indicators Indicator Series • Indicators • Simple Moving Average, pivots, VWAP. • Simple to define and configure • Used by Strategies • Updated either on 5sec or for each bar.

More Related