Dr. Toad's Journey to Bankruptcy or Financial Freedom

TCO is trending down and you're short (or will be at market open) so, in theory at least, probability is on your side and your profit target will be hit before the SL. However, if you look at the volatility of TCO (adding the standard 14 period ATR is as good a way as any that I know of), then you'll see that the stock could easily move almost $1.50 on the day. Current price is around $67.00 and, with a target of 1%, you're aiming for $0.67 per share traded. One thing's for sure, with an ATR at well over two times your stop loss and profit target - the probability of one or other of them being hit during the day is very high indeed. I'd happily bet on that - and heavily. As to which one gets hit first is anyone's guess!

It was not by accident that this was done. If you take a look at the screener results, it is showing that 11 of the 15 previous days the 1% target profit was hit (~$0.70), and 5 of the 15 times the 1.5% (~$1.05) target was hit. Only 2 of the 15 previous days hit 1% up. There were a few days with a substantial downside and one with a large upside which skewed the ATR. So although the average range of the stock is quite large relative to the stops I set, the immediate trend is showing that the range is significantly skewed to the downside. I expect this will be the case of most of the trades in this system and is something I will keep in mind if I need to rework it.

Also, I wouldn't set a profit target - at least not one that's percent based. If you feel the need for a target, I'd suggest looking at something that's TA based and has some logic behind it, rather than an arbitrary number.

I do not disagree with your statement that a hard profit target should not be set. In fact, if I had time to dedicate to screen watching, I would play these by setting a soft target and as the target was approaching look at the trend to make the final decision as to when to exit. Essentially I would let the trend I see continue until it is broken and then exit (provided it is not near the end of the day). This was actually how I tried to play the 1.0 version trades, but I simply can't dedicate the time required to do this while at work. This is why I have the hard targets set.

However, the hard targets I set are not completely arbitrary. The way they are derived comes from the immediate (15 day prior) price trend. This is a system based on momentum so the underlying theory is that the price action will continue to act in a similar fashion in the immediate future (i.e. the following day). It is possible that 15 days is still to large of a window to look at for a short term strategy...or simply possible that there is no edge to be found from looking at it in this way. Time will tell.

Also, while you're at work, if you're able to, take a gander at what the S&P futures are doing half an hour or so before market open. If they're trending up, then cancel your pending short order - especially if you're sticking with the 1% SL and profit targets. If you have pending orders to the long and the short side, then you could use the futures as a guide as to which to leave in place and which to cancel. Just a thought.
Tim.

This is doable and something I will keep an eye on for future trades. Not going to incorporate it quite yet, but I have been thinking along these lines as well. I am also considering doing one short and one long play each day to hedge my risk somewhat in the event of a major good (or bad) news event that impacts all stocks. Some things to consider going forward, but not going to act on them yet.


Today was a loss for the system:



I forgot to set my alerts after open so got screwed a bit more than I should have with the trade. A mistake that is good to make while my risk is still small...won't do that again, but it is clear that luck does not favor me.

Trade 3 summary:
Date 9/10/15
Stock: TCO
Outcome: -1.42% (-1.42% normalized)
"could have been" outcome: -1.42% (-1.42% normalized)

I have also realized that unless I normalize my results, they won't tell me much, so I will normalize all trades planned risk to 1%.

This changes the previous trades to:

Trade 1:
normalized outcome (both cases): -0.153%

Trade 2:
normalized outcome (actual): + 1.00%
normalized outcome (could have been): + 0.667%


TCO still looks like a good one, but I have been watching CBS for a while now and like it more since the trend is better defined. So, tomorrow my play will be CBS. ARHM is still hovering around the trend I drew...slightly above it now I think.



The stock has been trading sideways (but nearly always a down day) for a little bit now, but it is approaching the main down trend again. The trend of the sector is down as well.



Target profit and stop will be set at 2%. 42 of the 60 previous days have been down open to close, and the recent trend for Fridays is down so I am liking the odds.
 
Last edited:
It was not by accident that this was done. If you take a look at the screener results, it is showing that 11 of the 15 previous days the 1% target profit was hit (~$0.70), and 5 of the 15 times the 1.5% (~$1.05) target was hit. Only 2 of the 15 previous days hit 1% up. There were a few days with a substantial downside and one with a large upside which skewed the ATR. So although the average range of the stock is quite large relative to the stops I set, the immediate trend is showing that the range is significantly skewed to the downside. I expect this will be the case of most of the trades in this system and is something I will keep in mind if I need to rework it.
Hi Dr. Toad,
I'm not disputing either your logic or your analysis - both of which are fine. All I'm saying is that if your SL is less than ATR (under 50% in TCO's case), then it's pretty much a 50:50 gamble as to whether it's your SL or profit target that gets hit first. Without wishing to rub salt into the wound - yesterday was a case in point. To my way of thinking (which I accept may be different to yours), this overrides everything else. You can trade any instrument in any market and the analysis can be top drawer - really first class - but it will all count for nothing if you don't factor in the instrument's volatility.
Tim.
 
Friday was a success in the system. I made my exit when the trend was broken around 2:30. Reason being that it was unlikely to hit the target with just 1.5 hrs left to trade and if the downtrend resumed, I probably wouldn't get a much better exit anyways. I was fortunate to see the trend break since it headed back up afterwards although still ended as a down day open to close so a win in my system both ways.



Trade 4 summary:
Date 9/11/15
Stock: CBS
Outcome: +1.17% (+0.584%% normalized)
"could have been" outcome: +1.50% (+0.75% normalized)

Week 1 summary:
2 wins (+1.584% normalized), 2 losses (-1.573% normalized). A wash in every sense so risk stays at $25 for next week.



I tend to favor stocks that have stronger trends, and I think I need to pay more attention to the trends within the major trend. This would have kept me out of TCO since it was near the bottom of the secondary channel trend the day I went in and so should (and has) head north for a few days. I went in on this purely based on the statistics it was showing. Also, looking back at it, the trend is not that clear likely due to the volatility as timsk pointed out.

In order to help focus myself a bit on stronger trends and not purely good stats, I have gone through the first several hundred result of my screener and have selected stocks that appear to have good trends as well as good stats. After all, why make a play that only has good stats when there is an equally good one that has a clear trend and good stats.

I have gone through these and derived the slope of the trendline. Some of the ones that looked good a first glance, appear only mediocre after a closer look. I will be outlining each below with my intents. In general, if a stock has a day completely above the trend maximum price, I will consider the stock to have broken the trend and intend to leave it out of play unless it goes back below the trend maximum price or otherwise develops a new trend. I will still run my screener for all stocks since I doubt I have captured all of the good plays in this, but these will likely be my plays for the next week and possibly two.

Stock 1:




Although I know I said I was going to not make plays in the oil and gas sector due to their comparatively larger volatility, it would be stupid for me to completely dismiss the strongest trending sector based simply on how I feel. Compared to most other stocks in this sector, this one is showing some of the least amount of upside to it and is trading right on the main trend as I see it for the time being.

For now I am setting target profit and stop loss both at 3%. I have added the ATR(14) into my screener as well as RSI(14). With a stop and profit at 3% (~$1.30), I am setting targets at 67% the ATR of about $2.00. The RSI(14) is showing the stock is on the verge of "oversold" so people trading this way might start buying in late this week.

This looks to be a good play for Monday and potentially the following few days.


Stock 2:




This one was good to me Friday, but it would probably be wise to hold off on this one for about a week. It is trading sideways still, and will likely do so until it approaches closer to the trendline. I plan to wait on this one until the trend is confirmed to hold, or a new downtrend begins. I expect this will approach the trend as I see it in about a week.

The RSI(14) is still indicating a downtrend which is how I see it as well.


Stock 3




Currently at the main trend line as I see it. This stock did slightly break from the secondary trend (consolidating up) on Friday favoring to follow the main trend. I will wait for one more day to confirm the secondary trend broke and the stock is still following the main trend. If it drops on Monday I will consider making this my play for Tuesday. RSI(14) is right at 50, so not favoring uptrend or downtrend.


Stock 4




Another oil and gas sector stock. This one is towards the bottom of the channel it is trading in, so I will hold off on making this play as I expect it might have 1 more down day but then turn north for a few days.


Stock 5




This looks like a good play for this week in addition to Stock 1. The stock just approached the main trend line and was repelled down on Thursday and Friday. The targets for this stock will be 1.5% profit and stop loss (~$0.40). The current ATR(14) is about $1.20 which puts the targets at 33% the ATR. This may be a play later in the week.


Stock 6




This stock is also a potential play for later in the week. It is unclear if it's main trend will be broken or remain in tact at this point in time although the RSI(14) is still indicating a downtrend. Targets for this play will likely be 1.5% profit and stop (~$0.60). ATR(14) is about $1.10 which puts the target at 55% the ATR. This may also be a late week play.


Stock 7




This stock just recently broke into a downtrend after a 50-200 moving average cross. I will see if the trend develops a bit more before making the play. It is a possibility for the week after next. Targets will likely be 1.5% profit and stop (~$0.35). ATR(14) is about $0.62 which puts the targets at 56% the ATR. All indicators point to this one continuing down, but the trend needs to develop a bit further for me.


Stock 8




Stats on this one look good and the trend looks good, but this one is at the bottom of the channel it is trading in so it might be heading up this week. Stats indicate the target and stop should be set at 1.5% (~$0.41). The ATR(14) is about $0.65 which puts the targets at 63% the ATR. This is one to watch for the time being especially since the up gap was just completely filled, so the downtrend on this one may have just ended.


Stock 9




Another play that looks good, but is currently at the bottom of the channel it is trading in, so it may trade sideways for a bit.


Stock 10




Currently just above the trend as I see it. Upon a closer look at this one, the stats don't seem that good as the range does not seem to favor down or up. I probably will not trade this one although it does have a nice trend going for it.


To make it easier to track these and see when the trends are broken I have derived the slope of the trend line as I see it and extrapolated it out the next two weeks. If the stock has a day above the max price then I am considering the trend broken.



I will be taking a look at the sectors to verify they are all in a downtrend. Probably won't post that, but I am pretty sure they all are. Summary is, Monday I will be going in on Stock 1.
 
Went in on TTM instead of MPLX today. For some reason my order for MPLX kept getting rejected...perhaps no available shares to short. First time that has happened to me though.



TTM was my second pick although it does have a secondary trend upwards. I was going to wait for another day to confirm it had broken from it, but decided to just go ahead and go in on it since my risk is small. In the end it made no difference. Both choices ended the day practically where they started, but both slightly below the open.



Trade 5 summary:
Date 9/14/15
Stock: TTM
Outcome: +0.272% (+0.181% normalized)
"could have been" outcome: +0.272% (+0.181% normalized)

One interesting thing to note about this one is a buy order that was an order of magnitude (nearly 2 orders) greater than all other orders appeared in the Level 1 bid ask. It was a buy order for ~800 - fluctuated a bit. This order was present from about 11:30 - 1:00 and chased the price up from about 25.85 to the eventual day high of 25.96. The order then dropped off (it had been gradually reducing as the price increased) and the price plummeted below the initial level. This seems to confirm an earlier suspicion I had:

Very counter-intuitive, but the next time I get an opportunity to trade with level 2 quotes I will play them by going towards the high order of magnitude orders rather than away from. The basic assumption with this is the order is set mainly for someone to try to unload or buy as many shares as possible prior to the point being reached.

Perhaps the big players display a large order similar in magnitude to the size of order they want to place in the opposite direction they want to go and then slowly place small orders that fill in the opposite direction. They then reduce their large order as their net position favors the direction they really want to go. If I had several million to play with and didn't have to pay commissions, this might be a technique I would employ and seems to be the norm for when these large orders appear.

Another note on this is that most of the orders seemed to be being filled just above the large order. So say the bid was 800 @ 25.88 and ask was 10 @ 25.89, the orders seemed to always be filled at the 25.89 and rarely into the large order (25.88).

Maybe that is the "big secret" with level 2 quotes...go into the largest order. Of course it is super secret, so I doubt anyone who actually knows will confirm or deny this. It's of no consequence to me now though since I can't use level 2 quotes at my job, but interesting nonetheless.
 
I haven't given an update in a while partially because my trading scheme was completely systematic, so pretty boring to post and read I would imagine.

The following is where I stand with the probability 2.0 system. I made tweaks to the selection criterion last weekend in addition to doing some backtesting of it. Tweak, backtest, retweak, backtest again, retweak, backtest over different time, retweak, backtest again. You get the idea...very time consuming. BUT I do believe I am on to something with this.

The filter and selection criterion backtested over a market trending up and assuming all instances where stop and target were hit counted as a loss resulted in essentially a wash of the system. No gain, no loss. If half of the instances where both target and loss were hit were counted as loss and half were counted as gain, the system returned about 2.5% per month.

I tested over 7 months, so a sufficiently large sample size in my opinion for a daytrade strategy. Absolutely no discretion was used in selection and since the system was shorting stocks in an uptrending market and maintaining no loss or slight profit, I think that is quite convincing for something that will work in a downtrending market.

The recent few months (June to now) generated a 20% gain with a completely systematic approach counting all instances of both profit and stop hit as being a loss which just furthers my confidence that this will work well in a downtrend especially if some discretion is applied to the selection.


In addition to the selection tweaks, I am now waiting for what I consider confirmation of downtrend continuation before entering (instead of the blind market open entry). I am also exiting if I feel I have been proven wrong instead of waiting until market close or waiting for my stop to be hit. The final modification is instead of the hard profit target being set it is a soft target. If I am able to during the day, I will trend follow until stopped out. If I don't have time during the day, the blind system can still be used and should still be effective.


The reasons for the more discretionary based approach is mainly because I completely agree with this:

Its all hypothetical , if my win rate now is 60% it doesn't mean it will stay like that , past results are not necessarily indicative of future results.

Knowing that something is wrong with a completely blind systematic trading method is good to have, but that means you need to tweak it until it works again. Since I am in this for the long haul (hopefully), I need to be able to trade without a completely blind systematic approach in the event that a system I develop actually works for some time but then fails.

Being able to see highly probable outcomes for the stocks I trade is my intended edge, but this is not really any edge if the trades can't be made effectively. I am coming to the realization that there are many decisions in intraday trading that need to be made when trying to maximize returns when trend following intraday. Perhaps this is not the case when making multiple trades a day, but by limiting myself to 1 or 2 trades at most a day, I absolutely must try to squeeze every trade for as much as I can to be successful.

So, my intent is to create a playbook of sorts for trading stocks for myself. I intend to look at every conceivable intraday situation and develop the best way to trade it. In this way I am creating a completely systematic approach to what I would consider highly discretionary trading.


I began this more discretionary approach on Tuesday of this week. Although I will not implement this yet, my plan at some point will change to the following. Enter a short from screener selection process if/when confirmation occurs. If I get stopped out quickly from this, enter a long from screener selection process (need to create a filter opposite of the one I am currently using). I did test this a little on Friday although I just used the stock I shorted to do it.

The reasoning for this is that even in a market downtrend, there will be blocks of time where the market goes up (also vice-versa). This is likely the reason my backtest was able to be a wash in an uptrending market. My hypothesis is that by entering a highly probably long trade after a failed highly probable short trade I will be able to recover a portion of the loss incurred from the short. Obviously if the market is ranging that day this will potentially result in two losses instead of one so I will need to develop some rules around this if I get to that point.



Summary of Probability 2.0 Trades (tweaked to 2.1 as of 9/22/15):

This table does not include commission as that will become practically irrelevant as my final trade size is approached (and about 75% of the time my trades have no commission).



Per my original plan, I increased to a risk of $50 per trade last week and I will be increasing to a risk of $100 per trade this week.

A detailed account of the more decision based trades along with my thinking as the day progressed are shown below. If anyone thinks these should have been played a different way or disagrees with my logic please say so to help me learn.










Now off to start developing my playbook...
 
Market Behavior #1: The Sharp Drop with Pause

Knowing myself, the first thing I will try to do if I am successful in becoming financially independent trading is dedicate time to completely automating my trading process by creating a bot to mimic my actions for all the possible decisions that can be made when trading.

Along with understanding price action, this is a motivator for me to meticulously document market behaviors as I see them as well as specific actions I should take when they occur. These posts will essentially serve as a rough draft for programming intent. I am not going to try and capture every single situation a market behavior may present itself in these posts, merely the ones I have seen recently and that I feel warrant documentation. I intend to revisit these behaviors as I see more occurrences to revise or add to the actions that should be taken as my theories are confirmed or rejected.

If people have thoughts on the actions taken in these situations, feel these situations are not specific enough, are too specific, disagree with theories presented within, etc. comment on it please.

I will be presenting examples as I see them occur in both line charts as well as candle charts. The reason for this is simple. Currently it is only practical for me to trade using a line chart. Unfortunately data is lost in these charts, so given a choice I would use candle charts to trade. I would like to be able to see the trends clearly on both types of charts so it is useful to me now and in the future.

Although the actions taken and criterion for the behaviors are written very specifically, this is more for future automated trading. I realize with real trading I am not going to be able to verify a price has dropped 0.5% verses only 0.47% in 3 minutes or whatever the case may be as actions often have to be made with little pause when behaviors are noticed. My human trading will follow the basic "if it looks like a rat and smells like a rat, it is a rat" line of thinking. Prone to potential errors yes, but really the only way to do it if not completely automated.

Market Behavior #1: The Sharp Drop with Pause

Description: The stock enters a sharp drop followed immediately by a pause with no notable retrace.

Definitions:
  1. Sharp drop: a fall in stock price of more than 0.50% (approximately $0.13 for a $25 stock, $0.25 for a $50 stock, $0.50 for a $100 stock etc.) in less than 3 minutes.
  2. Pause: a stock enters a flat trading range for more than 3 minutes.
  3. Flat trading range: A trading range with upper and lower bound contained to approximately 0.15% or less (approximately $0.04 for a $25 stock, $0.08 for a $50 stock, $0.15 for a $100 stock, etc.).

Situation #1 criterion:
  1. Near beginning of trading day (11 AM or earlier)
  2. Already shorted stock and not seeking entry

Actions:
  • Once the pause has existed for more than 3 minutes, move the stop to just above (approx. 0.1%) the sharp drop beginning peak. The theory for this stop placement is that once a pause has established itself after a sharp drop the price is unlikely to retrace to a level just above (approx. 0.1%) the start of the drop. If it does, this likely signals a change in market sentiment and the price will proceed higher. Thus this marks a point where one can consider to have been proven wrong beyond reasonable doubt of the price direction.
  • If the pause exceeds 10 minutes, move the stop to just above (approx. 0.1%) the flat trading range peak. The theory for this stop placement is that the longer a pause exists, the more likely the stock is to move very rapidly in one direction once the range is broken. A stop placement just above the peak allows for some minimal price fluctuation out of range but protects from a sudden push upwards. The risk with this stop placement is being stopped out if the stock transitions to a low or moderate amplitude trading range instead of resuming the downward trend.

Situation #2 criterion:
  1. Near beginning of trading day (11 AM or earlier)
  2. Looking to enter stock short

Actions:
Once the pause has existed for more than 3 minutes, set a short sell limit order just below (approx. 0.1%) the flat trading range trough. The theory behind this order placement is similar to the above thinking in that this permits entry if the stock takes off suddenly downwards and it prevents entry if the stock proceeds back up. The only real risk with this order placement is if the price creeps downwards while still trading in a very flat range. Due to this, a stop should be placed a moderate distance (approx. 0.5%) above the flat trading range immediately upon being filled. This will allow the trade to enter a range after being filled without being stopped out but will serve as protection against a sharp raise.


Market behavior #1 examples:

Example #1:
Date: 9/22/2015
Stock: M
Approximate time of occurrence: 10:04 AM – 10:13 AM



Example #2:
Date: 9/24/2015
Stock: M
Approximate time of occurrence: 9:39 AM – 9:44 AM

 
Time for a monthly summary. This month was a good month for me once I reworked my probability system and decided to slowly ramp up my risk.



The probability 2.0/2.1 system trades stand as:



A fantastic week by any account this week. Any week with a 1% gain or more makes me very happy. Risk increases to $150 next week. I am either getting very lucky, or am finally on to something that works. I will provide marked up charts later this weekend of the trades made this week.
 
Didn't have time to mark this weeks charts up in detail, but entries and exits are marked.

Monday:


Tuesday:


Wednesday:


Thursday:


Friday:


One thing I will note about Friday is I am documenting the third and fourth instances where I saw an order in the bid-ask that was a magnitude greater than all other orders.

The first instance I saw at the beginning of the day when I was looking to short. When the price was being run up I saw a bid order appear at approximately 50.75 for a size around 130x100. I was a bit quicker to place my short when the price fell back below this level than I would have been if I didn't see it.

I saw this again right around 1:00 and it was an ask order at approximately the same price for the same quantity (50.75, 130x100). I almost took this one as well, but decided to let it go since I had already made a good trade for the day. I'm kicking myself for not taking it now since the price kept going up from there.

If I were looking at level II quotes, I would no doubt see these orders sooner so would be able to play them at better price levels, but I am becoming fairly confident now that if you see an order that seems absurdly large, the best play is to go the direction opposite the large order. From now on, if I see these appearing on the bid-ask, I will make the play against them with an initial stop fairly close to my entry in the event that I am wrong.
 
Over the past few weeks it has become clear to me that I have been doing this wrong all along. This became clear to me as the system I was testing out began to produce losing weeks. I believe the problem has more to do with not being able to watch the market as closely as needed more so than the system itself failing. As I was reading over my earlier posts, I realized that the following statement makes absolutely no sense and exemplifies my backwards thinking:

Knowing myself, the first thing I will try to do if I am successful in becoming financially independent trading is dedicate time to completely automating my trading process by creating a bot to mimic my actions for all the possible decisions that can be made when trading.

This is very true to me in the sense that I strongly believe every process can and should be automated, but what makes no sense is why I wouldn't do this up front. After realizing this, I put a stop on my testing and began looking into this.

From the start I have been opposed to spending money on backtesting software and similar items related to trading. My thinking was that once I start producing returns from trading and demonstrate to myself that I can do this, I can spend a little money on this stuff. This is once again completely backwards thinking. The need for these items decreases once you have a working system. Thinking about it now, it is a bit ridiculous to be opposed to spending $300 or so for something like this and yet be perfectly fine with risking that much on a daily basis in the market.

So, I am going back to the start a bit. I am going to dedicate some time to developing an automated system, properly backtest it, and then hopefully implement it. I have been looking into some automation and backtesting software and I believe I will be going with TradeStation. From looking at their pricing schedule it looks like I can make trades for $0.01 per share and get level I real time data for NYSE and NASDAQ for $1.00/month each. I'm not a fan of the monthly minimum activity fee ($100), but once I have a working system in place I should easily meet the required minimum activity. I figure it will take a month or two to get something I am satisfied with, so ~$200 for proper development and testing software seems reasonable to me. If it doesn't work out, I just close my account and move on.

In order to get the most out of this, I am going to try and code a basic system for TradeStation before opening my account with them. This way I don't spend as much time learning the coding language. Instead I will spend more time troubleshooting, backtesting, and optimizing the base system I use.

After thinking on this some, I have decided the base system I will use will be (sort of) the one Mr. Charts documents in his thread (http://www.trade2win.com/boards/stocks/123944-how-make-money-trading-markets.html). This system as well as the one outlined by dbphoenix (http://www.trade2win.com/boards/tec...can-become-successful-trader.html#post2592986) and indeed the market behavior #1 I observed all seem to be variations of the same thing. Essentially: see a trend, see a consolidation, see trend continue, enter trade, exit when trend ends.

My intent to begin is to develop a system that will automatically trade breakouts...the consolidation then trend start phase. If backtesting shows this is not a viable system, the first tweak I will make is to add in the trend prior to consolidation. I will outline the basic system in my next post, then spend some time on developing the proper code for the system in TradeStation.

As is often said over and over again and I am finally beginning to realize, the key seems to have more to do with limiting your losses and letting your winners run than the exact entry and exit criteria you use. Reading this over and over again annoyed me to no end since it seems so obvious but implementation is difficult (especially when not dedicating time to screen watching). I believe Mr. Charts method of trade management is a viable way of doing this though which is why I am using it as my base. In essence this is the same trade management technique outlined by dbphoenix. Two people claiming a similar viable trade system...can't go to far wrong with that I suppose.


Hindsight is a bitch...had I paid more attention to one of the first comments in this journal, I would have started this process before now.

Lose sight of the money, and perfect your techniques.

What better way to do this then develop an automated system? Not all is lost though, I wouldn't really have known where to start back then anyways.
 
Part 1 of the base system I will be using is defining the trade entry criteria. The code logic for this is as follows:

Base variables:
t1 = minimum time to consider a consolidation phase (optimization variable)
t2 = candle time interval (either 1 minute, 3 minutes, or 5 minutes per Mr. Charts system)
n = number of rising candle to consider a trend start (optimization variable – either 2, 3, or 4)
p1 = maximum price variation to consider a consolidation phase (optimization variable – will be normalized as a percent to make it independent of stock price)
p2 = minimum price variation to consider breakout from consolidation phase (optimization variable – will be normalized as a percent to make it independent of stock price)

Only execute criteria checks if no open trades
Consolidation Criterion:
Define minimum consolidation range start and end times:
Start time = current time – (t1 + n*t2)
End time = current time – (n*t2)

Check if in consolidation phase:
Consolidation high = the high between the start and end times
Consolidation low = the low between the start and end times
If the consolidation high – the consolidation low < p1
Then Consolidation = True
Else Consolidation = False

Rising Candle Criterion (Long Position):
Only execute check if consolidation check passes:
If Consolidation = True
Then

Check if rising candles are occurring:
If the low n candles ago > low n + 1 candles ago
And the low n – 1 candles ago > low n candles ago
And the low n – 2 candles ago > low n – 1 candles ago (*for n > 2 only)
And the low n – 3 candles ago > low n – 2 candles ago (*for n > 3 only)

Verify sufficient breakout of consolidation phase has occurred:
And the high of the last candle > Consolidation high + p2
Then Rising Candle = True
Else Rising Candle = False
Else Next

Falling Candle Criterion (Short Position):
Only execute check if consolidation check passes and not rising candle:
If Consolidation = True
And Rising Candle = False
Then

Check if falling candles are occurring:
If the high n candles ago < high n + 1 candles ago
And the high n – 1 candles ago < high n candles ago
And the high n – 2 candles ago < high n – 1 candles ago (*for n > 2 only)
And the high n – 3 candles ago < high n – 2 candles ago (*for n > 3 only)

Verify sufficient breakout of consolidation phase has occurred:
And the low of the last candle < Consolidation low - p2
Then Falling Candle = True
Else Falling Candle = False
Else Next
 
You probably don't need any advice but in case you do - I wouldn't waste money on Tradestation when there are better platforms for free, like MT4. There is an all encomposing book written especially for it too.

But I like your idea of testing your systems by coding them up. Wish I could but I wasn't born to be a coder.
 
You probably don't need any advice but in case you do - I wouldn't waste money on Tradestation when there are better platforms for free, like MT4. There is an all encomposing book written especially for it too.

But I like your idea of testing your systems by coding them up. Wish I could but I wasn't born to be a coder.
I may be wrong about this but, as far as I know Pat, it's not possible to trade equities with MT4. For reasons I've never really understood, MT4 is biased heavily towards forex, with a few commodities and indices thrown in.

Good luck with your plan Dr. Toad. It's sounds like you're chasing the holy grail to me but, if you can do it (and it's not for me to say that you can't), then you'll do very well. The problem with all coding is it's inflexibility and inability to adapt to an ever changing market. To use an analogy, if you equate trading to a rodeo, the market is the bull and the trader is the poor cowboy on it's back hanging on for dear life. Much easier for the 'bull' to throw off an automated bot than to throw off a discretionary trader who is able to adapt to its constant gyrations!
Tim.
 
I may be wrong about this but, as far as I know Pat, it's not possible to trade equities with MT4. For reasons I've never really understood, MT4 is biased heavily towards forex, with a few commodities and indices thrown in.

Good luck with your plan Dr. Toad. It's sounds like you're chasing the holy grail to me but, if you can do it (and it's not for me to say that you can't), then you'll do very well. The problem with all coding is it's inflexibility and inability to adapt to an ever changing market. To use an analogy, if you equate trading to a rodeo, the market is the bull and the trader is the poor cowboy on it's back hanging on for dear life. Much easier for the 'bull' to throw off an automated bot than to throw off a discretionary trader who is able to adapt to its constant gyrations!
Tim.

MT4 covers equities, Tim. I use it for spread betting equities (the spreads are much tighter nowadays which makes CFD not so attractive until your poundsperpoint gets on the high side. I guess it can be bespoke according to brokers' needs.
 
MT4 covers equities, Tim. . . .
Oh, okay Jon, I stand corrected! Interesting, may I ask which broker you are with?

There are no equities listed with either ETX or InterTrader Direct - but maybe that's because the default setting is not to list them and one has to ask one's broker to include them? Be that as it may, if Dr. Toad can find a broker that has the universe of U.S. equities that he requires, then I agree with Pat. Why fork out money for TradeStation when you can have MT4 for free. Also, the benefit of MT4 is that it's so ubiquitous now that there are lots of really good coders out there (and cheap too) who can assist Dr. Toad if he encounters any coding hurdles.
Tim.
 
I wouldn't waste money on Tradestation when there are better platforms for free, like MT4. There is an all encomposing book written especially for it too.

I use it for spread betting equities (the spreads are much tighter nowadays which makes CFD not so attractive until your poundsperpoint gets on the high side.

Actually MT4 was where I started my search. As I looked closer at it though, I was unable to find any broker offering MT4 or MT5 to trade actual equities. I was only able to find brokers offering MT4/MT5 to trade derivatives of equities (CFDs and spread betting) which is illegal in the US. Perhaps there is one that exists, but I wasn't able to find one in my search.

From there I jumped to NinjaTrader, AmiBroker, or TradeStation. I didn't look that closely at NinjaTrader, but the reason I settled on TradeStation versus AmiBroker is because TradeStation is essentially an all-in-one. With AmiBroker I would need the program and a new broker (with a data feed). I looked at AmiBroker with Interactive Brokers (as it seems to be the only option) and it looked like the AmiBroker program would need to communicate with the Interactive Brokers trading system which would then execute the trade. The more moving parts needed with anything, the more likely something breaks so I wasn't a big fan of that.

Since TradeStation has the platform built into the broker there are less moving parts. Either one I go with I seem to be limited to one broker option which sucks, but you can't have everything. I don't expect I will have issues though since TradeStation has been around for a long time and generally appears to be regarded as good.

Also, as far as wasting money on TradeStation, once I start trading I do not expect I will be paying the maintenance fee since if you trade 5000 shares in a month you are exempt from it. Last month I traded ~3500 shares and that was a light month since I was ramping up my strategy. Through the middle of this month I was at ~4100 shares, so when I have a system in place with my intended risk I expect I will be trading ~7000 - 10000 shares a month. That comes out to be about $140 - $200 in transaction fees a month at $0.01 per share. It is twice as much as Interactive Brokers, but is still pretty minimal for that volume in my opinion. To me, the premium is worth fewer moving parts.

But I like your idea of testing your systems by coding them up. Wish I could but I wasn't born to be a coder.

Come on Pat, neither was I. I absolutely hate coding and am not very good at it. In this case though the benefits of being able to do it far outweigh the small pain to go through and learn it.

It's sounds like you're chasing the holy grail to me but, if you can do it (and it's not for me to say that you can't), then you'll do very well. The problem with all coding is it's inflexibility and inability to adapt to an ever changing market.

I have my doubts as to whether this will really be successful or not, but another thing that has pushed me in this direction is quite simply because there are very few retail traders that will go this far. Since the majority of retail traders fail, I am increasing my chance of success by doing something that very few of us do. Another reason for this is that by doing this, I will at least have a very good idea of a systems viability before I ever bring it live which is something that is next to impossible without proper software. That is why to me it does not seem like a waste of time or money even if I end up being unsuccessful.

As far as coding being inflexible and unable to adapt I disagree. Although I think as humans we like to perceive ourselves as being fluid and ever changing to the situation, we really won't change our ways until we learn otherwise. A system can be coded to act just as a human would...I would say even to the point of trading with fear and greed. If you know what causes you fear in the market you can code a program to take the same actions when the situations that present fear arise.

Just as a human will over time change the way they do things, a systems code can be tweaked when the designer notices it is not performing as well as it used to. I do not see this as a once and done solution, more as a way to enable myself to daytrade with a full time job. System tweaking can be done at night and on weekends, and all that is needed during the day is passive monitoring which I can do from my phone.

My hope with this is that the base system I develop will be break-even. With proper stock selection or some tweaking I may be able to get a system with a positive expectancy. The stock selection bit is somewhat of a mystery to me with Mr. Charts method. From what I have gathered so far though it seems good selections are low spreads, relatively slow moving, and important days (earnings).
 
The stock selection bit is somewhat of a mystery to me with Mr. Charts method. From what I have gathered so far though it seems good selections are low spreads, relatively slow moving, and important days (earnings).
Dr. Toad,
I accept your comments about coding although I don't agree with you entirely. That said, I won't argue the point as I don't want to dissuade you or appear to be negative. On the contrary, I wish you well with it and hope that you'll continue to post your progress to this thread.

With regard to the part of your post that I've quoted, I suggest getting in touch with Mr. Charts directly and tell him what you're wanting to do. In my experience, he's very happy to help members who are respectful and willing to put in the spade work. Also, AFAIK, no one else has attempted to do what you're proposing, so I imagine he'll be very interested to see how you get on.

Good luck!
Tim.
 
With regard to the part of your post that I've quoted, I suggest getting in touch with Mr. Charts directly and tell him what you're wanting to do. In my experience, he's very happy to help members who are respectful and willing to put in the spade work.

I will keep that in mind. I still haven't made my way through the thread in its entirety though, so I will hold off on that until I have done so and am a bit closer to the testing stage of this.



Part 2 of the base system I will be using is defining more stringent trade entry criteria, defining the position size, and entering the trade. The code logic for this is as follows:

Trade Entry Criterion:
Only execute if valid entry signal:
If Rising Candle = True
Or Falling Candle = True
Then

Check for excessive bid/ask spread:
BidAsk = current ask – current bid
If BidAsk < current ask*0.075% (results in max spread of $0.15 for $200 ask and $0.015 for $20 ask)
Then Check1 = True
Else Check1 = False

Check current bid is sufficiently above previous low for long trade:
If Rising Candle = True
Then
If current bid – previous candle low > current bid*0.1%
Then Check2 = True
Else Check2 = False

Signal to enter trade long:
If Check1 = True
And Check2 = True
Then EnterLong = True
Else EnterLong = False

Else
Check current ask is sufficiently below previous high for short trade:
If previous candle high – current ask > current ask*0.1%
Then Check2 = True
Else Check2 = False

Signal to enter short trade:
If Check1 = True
And Check2 = True
Then EnterShort = True
Else EnterShort = False
Else Next

Position Size Criterion:
Only execute if trade entry criterion passed (long trade):
If EnterLong = True
Then

Set risk:
Risk = account size*0.5%

Calculate max # of shares easily traded:
Shares1 = number of shares traded for stock in last 15 seconds  round to nearest 100

Determine location of initial stop loss:
SLi = Previous candle low - $0.01

Calculate shares from risk and round to nearest 100:
ShareLoss = current ask - SLi
Shares2 = Risk / ShareLoss  round to nearest 100

Calculate max shares from available margin and round down to nearest 100:
Shares3 = Available margin / current ask  round down to nearest 100

Set position size:
PositionSize = min(Shares1, Shares2, Shares3)
Else Next

Only execute if trade entry criterion passed (short trade):
If EnterShort = True
Then

Set risk:
Risk = account size*0.5%

Calculate max # of shares easily traded:
Shares1 = number of shares traded for stock in last 15 seconds  round to nearest 100

Determine location of initial stop loss:
SLi = Previous candle high + $0.01

Calculate shares from risk and round to nearest 100:
ShareLoss = SLi - current bid
Shares2 = Risk / ShareLoss  round to nearest 100

Calculate max shares from available margin and round down to nearest 100:
Shares3 = Available margin / current bid  round down to nearest 100

Set position size:
PositionSize = min(Shares1, Shares2, Shares3)
Else Next

Enter Trade:
If PositionSize > 0
Then
If EnterLong = True
Then execute market order long for PositionSize (**may want to include criteria for maximum increase in price during order execute**)
Else
Execute market order short for PositionSize (**may want to include criteria for maximum decrease in price during order execute**)


Part 3 is defining the base stock selection criteria (likely will be run independently each night and manually update the execution and management program). The following is my current thinking as a starting point:

Check for adequate liquidity:
The average daily volume for the past 10 days > 750,000
The minimum daily volume within the past 10 days > 400,000

Eliminate very low priced stocks:
Close > $20.00

Eliminate fast moving stocks:
Daily ATR(10) / Close < 2%
 
Last edited:
Wow. As well as the thumbs-up button for Like This Post, maybe we need a button for Good Grief! Look At That!

You're nothing if not thorough Doc.
 
You're nothing if not thorough Doc.

Thanks, but really I'm just trying to produce programming logic without holes. Indeed the reason I hate coding is because it takes a ridiculous amount of logic to accomplish small tasks.



Part 4: Establishing the trade management rules, account protection rules, and global execution rules

Variables:
p3 = percentage increase in candle range indicating likely trend end (optimization variable – try 200%, 300%, 400%, 500%)

Trade Management Criterion:
Only execute if have open position

Determine if movement speed is sustainable:
If previous candle range > p3*n minute ATR(14)
Then Sustainable = False
Else Sustainable = True

Trade management for long trades:
If current open position is long
And previous candle low > SLi
Then

Relocate stop loss if move appears to be unsustainable (long):
If Sustainable = False
Then

Sell if price has dropped below the midpoint of the previous candle and add trade results to daily tally:
If Current price < Previous candle range/2 + Previous candle low
Then execute market order sell for PositionSize
And ProfitLoss = ProfitLoss + trade profit/loss
Else

Move stop loss to midpoint of the previous candle and move open stop loss:
SLi = Previous candle range/2 + Previous candle low
And place stop loss sell order for PositionSize at SLi
Else

Relocate stop loss if move appears to be sustainable:
SLi = Previous candle low – $0.01
And place stop loss sell order for PositionSize at SLi
Else Next

Trade management for short trades:
If current open position is short
And previous candle high < SLi
Then

Relocate stop loss if move appears to be unsustainable (short):
If Sustainable = False
Then

Buy to cover if price has risen above the midpoint of the previous candle and add trade results to daily tally:
If Current price > Previous candle range/2 + Previous candle low
Then execute market order buy to cover for PositionSize
And ProfitLoss = ProfitLoss + trade profit/loss
Else

Move stop loss to midpoint of the previous candle:
SLi = Previous candle range/2 + Previous candle low
Else

Relocate stop loss if move appears to be sustainable:
SLi = Previous candle high + $0.01
Else Next

Account Protection Criteria:
Prevent holding positions overnight:
If time to market close < 5 minutes
Then liquidate all open positions
Else Next

Update daily profit/loss tally if stop loss executed:
If stop loss order executes
Then ProfitLoss = ProfitLoss + trade profit/loss
Else Next

Update trailing trade stop parameter (protect realized profits from overtrading) on position close:
If closed trade was profitable
Then DailyStop = DailyStop + trade profit*0.9
Else Next

Global Trade Execution Criterion:
Set initial daily loss limit:
DailyStop = -1.5*Risk (only defined on program startup, not subsequent iterations)

If ProfitLoss < DailyStop
Or time to market close < 20 minutes
Then end program
Else Next



__________________

That pretty much concludes my initial thoughts for the programming intent. Now to start putting it into EasyLanguage (which I can only hope is as easy as the name indicates)...
 
Actually MT4 was where I started my search. As I looked closer at it though, I was unable to find any broker offering MT4 or MT5 to trade actual equities. I was only able to find brokers offering MT4/MT5 to trade derivatives of equities (CFDs and spread betting) which is illegal in the US. Perhaps there is one that exists, but I wasn't able to find one in my search.

From there I jumped to NinjaTrader, AmiBroker, or TradeStation. I didn't look that closely at NinjaTrader, but the reason I settled on TradeStation versus AmiBroker is because TradeStation is essentially an all-in-one. With AmiBroker I would need the program and a new broker (with a data feed). I looked at AmiBroker with Interactive Brokers (as it seems to be the only option) and it looked like the AmiBroker program would need to communicate with the Interactive Brokers trading system which would then execute the trade. The more moving parts needed with anything, the more likely something breaks so I wasn't a big fan of that.

Since TradeStation has the platform built into the broker there are less moving parts. Either one I go with I seem to be limited to one broker option which sucks, but you can't have everything. I don't expect I will have issues though since TradeStation has been around for a long time and generally appears to be regarded as good.

Also, as far as wasting money on TradeStation, once I start trading I do not expect I will be paying the maintenance fee since if you trade 5000 shares in a month you are exempt from it. Last month I traded ~3500 shares and that was a light month since I was ramping up my strategy. Through the middle of this month I was at ~4100 shares, so when I have a system in place with my intended risk I expect I will be trading ~7000 - 10000 shares a month. That comes out to be about $140 - $200 in transaction fees a month at $0.01 per share. It is twice as much as Interactive Brokers, but is still pretty minimal for that volume in my opinion. To me, the premium is worth fewer moving parts.



Come on Pat, neither was I. I absolutely hate coding and am not very good at it. In this case though the benefits of being able to do it far outweigh the small pain to go through and learn it.



I have my doubts as to whether this will really be successful or not, but another thing that has pushed me in this direction is quite simply because there are very few retail traders that will go this far. Since the majority of retail traders fail, I am increasing my chance of success by doing something that very few of us do. Another reason for this is that by doing this, I will at least have a very good idea of a systems viability before I ever bring it live which is something that is next to impossible without proper software. That is why to me it does not seem like a waste of time or money even if I end up being unsuccessful.

As far as coding being inflexible and unable to adapt I disagree. Although I think as humans we like to perceive ourselves as being fluid and ever changing to the situation, we really won't change our ways until we learn otherwise. A system can be coded to act just as a human would...I would say even to the point of trading with fear and greed. If you know what causes you fear in the market you can code a program to take the same actions when the situations that present fear arise.

Just as a human will over time change the way they do things, a systems code can be tweaked when the designer notices it is not performing as well as it used to. I do not see this as a once and done solution, more as a way to enable myself to daytrade with a full time job. System tweaking can be done at night and on weekends, and all that is needed during the day is passive monitoring which I can do from my phone.

My hope with this is that the base system I develop will be break-even. With proper stock selection or some tweaking I may be able to get a system with a positive expectancy. The stock selection bit is somewhat of a mystery to me with Mr. Charts method. From what I have gathered so far though it seems good selections are low spreads, relatively slow moving, and important days (earnings).
All the points you make about Tradestation are spot on.

I also had the setup you described - Amibroker with IB. Amibroker is a good cheap option if you want a programmable interface. IB is a decent broker which has the advantage of being able to trade in several different markets and instruments.

I also have and use the Tradestation option and never pay the platform fees because I always trade more than 5000 equities per month. This really is not difficult to do. As an illustration - if you work on 20 trading days in a month, it equates to 250 per trading day i.e. a buy of 125 shares followed by closure of the position.

I also agree with you totally on coding. It is not that difficult once you get into it and when you are focussed on a personal objective (making money !!) it becomes quite absorbing. It allows you to change with time as the markets change, as your strategy develops, as your coding skills develop etc.

You can also adjust the amount of automation you include. Start using it purely as a broker with charts and radar screens, start adding in more coded analysis , then move on to adding automated exits but discretionary entries and perhaps end up with totally automated entries/exits. It's up to you to decide what works and feels comfortable.

The TS forum is very active with educational webinars and documents:

http://www.tradestation.com/education/university/getting-started

and with a very helpful forum with loads of coding examples and advice from both other users or the TS staff who will correct coding for you

https://community.tradestation.com/Discussions/

Charlton
 
Last edited:
Top