No registration required! (Why?)

Dom's notes


Despite having been hammered for posting my sincere feedback re. ATW in the appropriate thread (or may-be, because of ...) I am starting this thread for the benefit of all waanabee traders.

I have no intent of sharing my exact trade setups, however I will share as much as I can - the good, the bad & the ugly, and if someone learn something from this then it won't have been a waste of my time.

I have been a student of the market for over 4 years now. I actually started my education with Investools PhD program (which was a lot of money for not much outcome in my case), trading stocks then options, then started to focus on the SPX (directional Calls/Puts then credit spreads), at some point I discovered the futures / ES in particular and that was a "revelation" ... 1/4pt spread vs 2pt spread for the SPX options, I was sold in no-time.

I purchased Todd Mitchell's system (TradingConcepts), which was a lot less money than Investools but no more outcome in my case, at least it triggered my interest in Fibs (back then, retracements only) and I did a lot of research / backtesting using Fibs - but at the end of the day, the real challenge resides in figuring out which fib level will "hold", and to this day I have to admit I have not solved it.

Anyway, I then spent a lot of time in a couple of "free" trading rooms
learning pure price action, the person that was offering his time teaching PA free for several months later offered a paying program, which I took, but I still couldn't make money live. I took another mentor, recommended on a free forum, and despite he being a nice guy (and why wouldn't he be when students are paying), this also was a failure.

I was about to throw the towel when I found ATW, started with the 101A education, added 3 weeks later the mentorship education, and have been studying / backtesting a lot for now a full year. I reached a point where I can "consistently" make fake-money on sim, however the transition to live trading is a real challenge for me, because of fear I pass on many trade setups and I deviate from my trade management rules.

So, that's the background. I trade CL (Crude Oil "big" contract) which is very liquid, has 1 tick spread throughout the European & US session, and is nicely volatile (day range is on average 250-350 ticks, some days even more - like today : 450 ticks). I find CL to have a lot of momentum, it shows very repetitive "patterns" (at least, for the fib user that I am).

I don't use any indicator, I trade price action using a lot of price projection techniques (best book IMO on this topic is Robert C. Miner "Dynamic Trading").

If I have one advice for new traders, it is look for another way of making a living ... but if you are truly in love with the markets, then I believe it is a must to 1) find an excellent education (this is way more than just reading books, and frankly, there is probably no one-stop education shop) and 2) find a mentor to accelerate your learning curve.

Now that this is out of the way, a brief summary of my week :

Tuesday - tried 1 trade early morning, entry hit no fill, that made me mentally sick for the rest of the day, I passed on 2 setups (both wins), the last setup I tried but my entry wasn't even close to be hit.

Wednesday - 2 setups no-fill, then 1 small winner (got out at 1/2 of my target for pseudo-good reasons - really, lack of discipline), and I passed on the last one (another wouldabe winner :( )

Thursday - passed on 5 setups (4 wins / 1 loss), took 1 small winner (1/2 target again, same lack of discipline), and missed the best setup of the day by being away for 5min

Friday - passed on 1 setup (win), no fill on next 2 setups, then I couldn't focus & called it a day.


Bottom-line - only 2 trades this week, I made ~10% of what I should have made if I had the discipline to follow my plan.
Funny I am the only one to have a journal on this site ... anyway, it kind of helps me wrap each week, and get a better view on goals & objectives for the week ahead, at least I benefit from doing it.

A better week for my other system, 3 wins / 1 loss ; net +1250.

The first losses since I went back to live with the reversal system ... 2 Longs on Wednesday, both were very valid setups, 1st one a little early, 2nd one got unlucky & stopped a few cents before the bottom of the entry pullback. One another trade today, got unlucky as well, trailing stop for runner triggered at the exact low tick of the 2nd pullback :( ... net -1210 for the week (-630 / -630 / +50).

A major milestone achieved on Wednesday, when backtesting of the reversal system on Ninja pretty much achieved parity with the original system in Ensign. This includes using a 2nd timeframe (1-second bars) for entry-order spacing, as well as updating entry level w/o waiting for completion of current bar on the main timeframe (this is to get the entry order as early as possible in the queue, while the entry spacing is to ensure entry orders are updated only after price stops moving higher (or lower) for a couple seconds).

I then went on to real-time testing using MarketReplay, which is not going well at all ... not that my strategy is doing anything wrong, but instead the problem is that MarketReplay (and simulated live) rely on a fill-engine which is different from those used in backtesting, and that fill-engine has major issues (apparently, its resolution is 1-second bars for some things - specifically, identifying if stop are triggered, but different for other things - specifically, computing the execution price for stops, resulting on stops executed (at better price) ahead of the trigger condition ... I will attach one example I submitted to the support forum, where a stop at 97.16 is triggered & executed at 97.21 at least 200 contacts before price ever touches 97.16).

So at this point I am unsure about the course of action, as I have 2 systems to verify, and no automatic way to check MarketReplay results against backtested results (and, no, I won't check manually ~1400 trades). Stay tuned :)

With this, I am off to an early week-end - I need it!

Click image for original size
demomarketreplayfillerror

A poor week for both systems :(

- 1 small win / 1 max loss for my other system ; net -810 for the week.
- 1 loss for the reversal system :; net -520 for the week.

Not a lot of visible progress on the R&D front, I did a few code-inspections covering about 80% of the software, followed by a number of optimizations which gained about 30sec per complete backtest (that is about 25% savings on the time taken by the strategy to execute ... most of the backtesting time is taken by Ninja building its bars-series from the historical database). I also tested the strategy in a tick-by-tick mode (in MarketReplay), it isn't supposed to be run that way (it just needs to be executed on bar close) but it is coded to at least work properly tick-by-tick, in doing so I uncovered yet another oddity from NinjaTrader (which also has a workaround). The last couple days of the week have been just downloading MarketReplay data from the Ninja server (1 day at a time !!!) and running the strategy in MarketReplay (8 months done so far, out of a total of 12 months I could download). Each month takes about 1h to run (at 500x), then I compare the MarketReplay trade log to Backtesting trade log, which is a pretty hazardous task given the number of MarketReplay fill errors (not only positive slippage on stops, sometime as much as 9 ticks, but also LMT fills at the extreme-tick - I wish I got that many) and really the worse : LMT fills at better price than the LMT price (one trade got a 4-ticks "price improvement" on a LMT exit !). I did as much as I could in terms of automated comparison of trade logs between MarketReplay & Backtest, but I end-up having to check the MarketReplay chart on about 1/2 of the trades. Anyway, the good news is that aside from those fill errors and a tiny stupid bug I found in my TradeManager, it appears the strategy is working just as good in MarketReplay as it does in Backtest. I think I'll move to my IB simulated account next week for the final phase of testing (which, really, has only to do with actual orders management ... I currently use 2 simultaneous opening orders per trade (1 per target), I am curious to see how TWS is going to like it (I have the possibility to send the 2nd order delayed by 1 or 2 sec if that is required, and I know down the road I will have to re-write the TradeManager & use the Ninja un-managed approach (in particular, to use only 1 opening order even when trading multiple targets).

Have a great week-end!




Another negative week for my other system : 1 BE / 3 losses (albeit 2 small ones) ; net -820 for the week.

A small positive week for the reversal system : 3 small wins / 1 loss ; net +400 for the week. That should have been +510, but I had a momentary lapse of reason yesterday & messed-up one trade. At least, I got back into it after manually bailing out, else the cost of that discipline error would have been even higher.

I purchased a license for Ninja/IB on Monday, as well as yet another datafeed (Kinetick, which turns out to be Telvent/IQfeed rebranded for NinjaTrader ... I am not disappointed the least, I know the quality of IQfeed for using 2 of these - one per system - for a year and a half), and I have had the 2 systems running on my IB sim account since Monday noon. At this point I have encountered already twice the same Ninja bug, in their order management layer ... Ninja sometimes cancels the other leg of an OCO target/stop (after the stop is hit), which TWS rejects, which panics Ninja & it disables the strategy :( Submitted all the logs for both occurrences, hopefully they will do something to fix this error! Aside from that, both systems have been behaving identically to their Ensign counterpart (which just says I did a reasonable job at porting / testing them).

I have been working this week on extending the trading hours for the reversal system, one interesting finding (that I never saw in Ensign as overnight setups were always filtered) is that this reversal setup is consistently losing between 2:30pm & 7am, and quite steeply at that between midnight & 7am. With the exception of Sunday evening (6pm to midnight), which has a pretty solid performance (and, thinking about it, it just makes sense). Performance from 7am to 8:30am is pretty reasonable, 8:30am to about 9am is deadly (news time, lots of spikes / fake reversals). I also found that I could suppress the lunch hour (roughly 12pm to 12:45pm), and extend the afternoons to just before 2:30pm Monday to Thursday (Friday is an exception to those 2 rules, it is better to trade straight until 1pm). With all this, the P&L goes up from 112k to 138k (+23%), the number of trades from 384 to 536 (+39%), P/F is down from 3.05 to 2.65, and max drawdown up from 2.7k to 4.4k (all this, for 2 contracts, from 19-Oct-2009 to 18-Jun-2012). This is still WIP, but I certainly like the P&L improvement.

The 2012 P&L isn't too exciting (7.4k / 46 trades in the current version, 12k / 68 trades in the "extended hours" version), but one element to ponder is the number of trades, which is certainly less than the past 2 years for the same period. From a pure performance point of view, P/F this year is 1.94 for the current version & 2.04 for the extended hours one, not as good as prior years, but not a disaster either.

Got to go now, have a great week-end!

A decent come-back for both systems:

- 3 wins / net + 1775 for my other system
- 2 wins / net + 650 for the reversal system

Of course, this is peanuts in comparison to today's rally in crude (over 700-ticks from the overnight low), but at least it is in the right direction.

On the R&D front, I did a couple very minor changes to the reversal system (Ninja version), and spent most of the week on that Ninja bug I reported last week ... in a nutshell:

1) Yes, Ninja support admitted there is a bug in the management of Interactive Brokers' OCO orders, which triggers Ninja to disable the strategy upon the first occurrence of it happening - very very frequently. The real surprise comes from their statement "it is the 1st time we are seeing this problem" ... either a plain lie, or they have NEVER tested Ninja automated trading with IB and they have NO customer using Ninja with IB for automated trading.

2) No, it won't be fixed in Ninja 7 - I was suggested to either used simulated OCO (2nd leg locally cancelled when 1st leg is filled, where with the IB OCO it is IB which cancels the 2nd leg upon 1st leg being filled ... HUGE difference in my books), or use un-managed (by Ninja) orders, which means a lot more development.

3) I found a 3rd way, by disabling Ninja's RealtimeErrorHandling, and doing that error handling myself ... I did cut a big corner by restricting each target to 1 contract, and after a couple days of work I now have something which is pretty resilient, not only to the IB OCO problem, but also to many other possible problems. Most of the code I developed to that effect will be re-useable when I tackle un-managed orders, but that will still take a lot more efforts.


BTW, the Ninja version of both systems did execute the exact same trades as the "official" Ensign systems. I wasn't expecting any-less, but in the context of this IB OCO bug it was a somewhat lucky outcome, as the reversal system did hit that bug every-time on the exit of 2nd contract.


Next week the 2 (Ninja) systems will be running using the new version of the TradeManager (still in my sim-account), and I will resume & finish the testing of error cases (can't do that over the week-end, it takes a live market)(so far that testing did "cost" me about $10,000 per day in my sim account, taking repeat trades w/ 3-ticks target & stop).

Have a great week-end!

- No trades this week for the reversal system
- 2 wins / 2 loss ; net -110 for my other system

I didn't finish on the error cases ... I did address UPS Suspend & system Shutdown, but I have some cases outstanding to address (loss of Internet, re-connection to TWS). I spent a good half of the week in putting in place a workaround for a Ninja design error (they use the same 'int' type for both bar number (CurrentBar) & bar offset (Open/High/Low/Close/Volume/...[ int nBarsAgo ]), which is a sure way to end-up with bugs by using an offset value where a bar number is required (& vice-versa). Although I was doing it mostly for future systems development, I back-prop'ed it to the reversal system & caught 1 bug.

With this done, I really need to get back to the error handling, as this is the last piece of the puzzle before I can consider taking the systems live on Ninja (but I will only do that until after I have at least one month of running a production version on my IB sim-account without any glitch).

- 2 losses this week for my other system ; net -1210. Tonight the P&L since Jan-1st-2012 is exactly +5 (that is, current drawdown is -3995 from May-8 P&L peak). The current drawdown isn't out of the "normal" range, however the peak P&L for the 1st 1/2 of the year is way under the prior 3 years. This is bad news, it looks like this market inefficiency the system was playing is gone ... I have a little homework to do to check if that's indeed the case.

- 2 tiny wins for the reversal system, net +200 for the week. 21 trades since I restarted trading it, P/F for 1st contract is just above 3.1, but P/F for 2nd contract is under 0.6, making the combo P/F 1.64 at this point (which isn't much representative, given the small sample of live trades).

I am done with error-handling on Ninja, pretty proud of the behavior on Internet-loss followed by reconnection (any strategy w/ an open trade is left alone, all open entries are cancelled, each chart is reloaded (data) then its strategy(ies) restarted, and I take care not to reload data for a chart/strategy if that would impact another strategy w/ open trades on same instrument - on same or different chart). I also did some clean-up in Ouput window messages, putting in place a standard header w/ Time / Chart / Strategy / TF / Bar#), and fixed a bunch of memory-leaks (ha! there isn't such thing in C# thanks to GC aka Garbage-Collector, right? wrong), which means I don't have to restart Ninja every-time before doing a backtest (and may-be I will finally be able to run the optimizer? not that I really care, though)

Have a great week-end


A quick update as I am about to leave for the week-end :)

- Reversal system: 1 win / 1 loss ; net +280 for the week
- Other system : 3 wins ; net +2085 for the week

I completed the last 2 work-items for the reversal system on Ninja: making all ToD (Time-of-Day) & other filters parameters accessible to the "end-user", and making the ToD filters work regardless of the local timezone (the ToD filters parameters are always expressed in Nymex local time, ie. EST, and the strategy converts the chart bars timestamps to that timezone).

I finally started (and already stopped) evaluating the CL historical data I had purchased from disktrading a couple months ago. Not only does this data lacks the "seconds" information in the timestamps, but it turns-out the reported volume is +/- 1 contract (most of the time +1 contract it seems). I decided to re-evaluate other options, mainly from TickData & TickDataMarket. I made a preliminary decision in favor of TickData, essentially because they provide all contracts entire history, which makes it possible to even backtest calendar spread strategies (no that I intent to do that anytime soon, but 1) who knows & 2) that gives me the flexibility to apply my own rules for rollover-dates.

In the process, I realized that my R&D PC's system hard-drive was way too small (a very old 160Gb HD). Decided to replace it with the spare 500Gb (4 year old) that came out of my trading PC a few months ago, of course I didn't want to reinstall Windows & everything, so I looked for HD-cloning solutions, and ended-up using Macrium Reflect (free edition), which didn't go that well for a number of attempts ... I finally got that working, but that required using both Partition Magic on the cloned-HD (which fixed one issue) then Macrium Rescue to make that cloned-HD bootable (I really
don't understand why the main product cannot clone a HD and make it bootable in one shot).

I also used my favorite defrag (JKDfrag) on the new HD ... and ...

.. the good news is the new HD is really faster than the old one ; backtesting the latest version of the reversal system was about 12min on the old HD, and now under 7min on the new one :)

This morning I started working on a new strategy, very-much derived from the reversal system stuff (but this time a 'trend' strategy) ... codename DX162, stay tuned :)

With that, I wish everyone a great week-end!
A pretty "interesting" week, although not a smooth one:

- reversal system : 2 trades, 1 full win (+1610) / 1 loss (-610) ; net +1000
- other system : 2 trades, 1 small loss (-95) / 1 win (+235) ; net +140

I decided on Wednesday to switch my live trading to Ninja ... I have gained enough confidence now and I don't see a reason to keep paying 3 datafeeds when 1 would be enough ... I immediately cancelled 1 IQfeed (which was on monthly plan, the other one is annual & payed to the end of the year), and I have been trading live on the IQ/Kinetick feed (Kinetick w/ IQfeed native driver, as the Ninja Kinetick driver is buggy) on my trading desktop, and monitoring on Ensign / IQfeed on my laptop.

As (bad) luck would have it, I experienced on Tuesday a few small Internet service interrupts ... no harm there, but on Wednesday at 11:51am I lost again Internet with an entry pending for the reversal system. Immediately got on the phone with IB support, which kept me on hold for 14 minutes, before finally getting to me. I closed the position at market without knowing anything, paying a $30 fee for that, for a net result on that trade of -110. My Internet came back about a dozen times in 2 hours, going within seconds every time ... when it was all said & done & stable, the official trade was a loser (the one I reported for -610), so that actually saved me $500.

On Thursday, for the 1st trade of the other system on Ninja, the entry was delayed because of a stupid warning message from TWS (because of coming through the API on a new client) ... by the time I saw it & clicked, the entry was gone, and I had to chase it manually (I decided on 4-ticks chase, and got filled in the next minute).

More stress today, as my other system just ran into a rare condition not fixed yet on Ninja (it is so rare!) ... had to fix manually the stop, and this time did the fix in Ninja.


On Monday/Tuesday, I restarted R&D on this DX162 system, enough to backtest a dozen different tries at it. All got very smooth equity curves, the only issue being equity curve slanted to the south (from -25 / contract / trade to -7.5 / contract / trade, all with $5 comms & 1-t systematic slippage on stops). I am glad I didn't spend too much time on this idea.

The rest of the R&D week was dedicated to writing software components ... Now that I have a better understanding of Ninja's architecture pros & cons, I have devised a pretty cool architecture to maximize flexibility & code re-use. This week I coded 2 classes, a TradingComponentsBase class, and a TrendBase class. The former is the interface between Ninja's architecture & mine, the later is designed to handle all aspects of a "trend", except for the actual trend-change mechanism, which is left for descendant classes to implement their own variant (actually, TrendBase has a default trend-change mechanism, which makes it mirror a Range chart). One of my ideas is to use a variety of trend-change mechanisms (say 10 for example), and use the first 3 or 4 to change-trend to validate a new trend direction (the idea being that not every mechanism is always slow or fast).
I am also planning on re-writing a Pivots class, which will be - by design - independent of any timeframe type (it will of course use price, time & volume, but won't rely on a particular type of bars, as opposed to my current Pivots, which must be run on Volume charts).

One of the applications of all this, will be using a synthetic contract made of the current front-month & the following month, for a more robust reading of volume indications around rollover date. This needs a way to synchronize 2 instruments, and really the best way I can think of is using Second-charts, and simply add volume from the 2nd instrument to the bars of the 1st instrument ... I am sure I will hit some Ninja roadblocks doing this, but I am expecting a lot from this particular technique, so it will be well worth the effort.

Have a good wek-end
I thought I would post the screenshot for Monday's reversal system win ... not only because it's a nice one, but actually mostly because it now displays pretty much identical to the Ensign version (I just added from within the strategy 2 visual "indicators", 1 gives vertical dark-gray lines on each 1min-bar boundary, the other one is the volume indicator.

Click image for original size
df20v032 23 07 2012 short win

- Reversal system : 1 loss ; net -110 (this was actually a target-1 win, and a loss on 2nd contract larger than target-1 ... 6-ticks slippage on that stop! )

- other system: 2 (small) wins / 2 losses ; net -255


Not a whole lot on the R&D front, I identified & fixed two bugs in the Ninja reversal system, each time I got worried a lot to spot these bugs in the middle of the trading day, only to realize after fixing them that they had to impact whatsoever in the system outcome. I also started working on a reversal system for ES, using my 1st "next-gen" software trading component "TrendBase", which naturally lead me to finalize this morning that purchase of historical data through TickData (July 2003 to June 2012 for CL/ES/6E, plus July 2009 to June 2012 for GC).

I spent a good part of the week dealing with personal issues, hopefully everything will be back to normal next week, so that I can play with this data!

Have a great week-end :)
Dom that equity curve looks too good to be true so I'd be scared but hope it trades like that in real time....what became of your trading contest...? how did Chuck Huges do ? He wants me to spend almost 4 k on options recomendations