Dr. Toad's Journey to Bankruptcy or Financial Freedom

This is a discussion on Dr. Toad's Journey to Bankruptcy or Financial Freedom within the Trading Journals forums, part of the Reception category; Knowing myself, the first thing I will try to do if I am successful in becoming financially independent trading is ...

Reply
 
LinkBack Thread Tools Search this Thread
Old Sep 27, 2015, 7:22am   #46
Joined Jul 2015
Market Behavior #1: The Sharp Drop with Pause

Dr. Toad started this thread 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
Click the image to open in full size.
Click the image to open in full size.

Example #2:
Date: 9/24/2015
Stock: M
Approximate time of occurrence: 9:39 AM – 9:44 AM
Click the image to open in full size.
Click the image to open in full size.
Dr. Toad is offline   Reply With Quote
Old Oct 3, 2015, 12:28am   #47
Joined Jul 2015
Dr. Toad started this thread 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.

Click the image to open in full size.

The probability 2.0/2.1 system trades stand as:

Click the image to open in full size.

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.
Dr. Toad is offline   Reply With Quote
Thanks! The following members like this post: Oscar Reed
Old Oct 4, 2015, 7:38pm   #48
Joined Jul 2015
Dr. Toad started this thread Didn't have time to mark this weeks charts up in detail, but entries and exits are marked.

Monday:
Click the image to open in full size.

Tuesday:
Click the image to open in full size.

Wednesday:
Click the image to open in full size.

Thursday:
Click the image to open in full size.

Friday:
Click the image to open in full size.

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.
Dr. Toad is offline   Reply With Quote
Old Oct 24, 2015, 2:34am   #49
Joined Jul 2015
Dr. Toad started this thread 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:

Quote:
Originally Posted by Dr. Toad View Post
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/stoc...g-markets.html). This system as well as the one outlined by dbphoenix (http://www.trade2win.com/boards/tech...ml#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.

Quote:
Originally Posted by tomorton View Post
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.
Dr. Toad is offline   Reply With Quote
Old Oct 24, 2015, 4:38am   #50
Joined Jul 2015
Dr. Toad started this thread 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
Dr. Toad is offline   Reply With Quote
Old Oct 24, 2015, 10:14am   #51
 
Pat494's Avatar
Joined Mar 2004
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.
__________________
Love your own area.
Long live NIMBYISM

for quality of life.

The Westcountry is being overrun with
grotty new estates
Pat494 is offline   Reply With Quote
Old Oct 24, 2015, 11:33am   #52
The Staff are paid members that perform various roles such as editorial, advertising, support or technical work.
 
timsk's Avatar
Joined Mar 2002
Quote:
Originally Posted by Pat494 View Post
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'm New To T2W - Where Do I Start? - a must read for anyone new to T2W
I'm New To TRADING – Where Do I Start? - a must read for anyone new to TRADING
The Trading Plan Template - a must read for anyone without a proper TRADING PLAN
Please note: I am part of T2W Admin' Staff - I am NOT a Moderator!
timsk is offline   Reply With Quote
Thanks! The following members like this post: alexaherself
Old Oct 24, 2015, 11:54am   #53
 
barjon's Avatar
Joined May 2003
Quote:
Originally Posted by timsk View Post
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.
barjon is offline   Reply With Quote
Old Oct 24, 2015, 12:36pm   #54
The Staff are paid members that perform various roles such as editorial, advertising, support or technical work.
 
timsk's Avatar
Joined Mar 2002
Quote:
Originally Posted by barjon View Post
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'm New To T2W - Where Do I Start? - a must read for anyone new to T2W
I'm New To TRADING – Where Do I Start? - a must read for anyone new to TRADING
The Trading Plan Template - a must read for anyone without a proper TRADING PLAN
Please note: I am part of T2W Admin' Staff - I am NOT a Moderator!
timsk is offline   Reply With Quote
Thanks! The following members like this post: Pat494
Old Oct 24, 2015, 5:00pm   #55
Joined Jul 2015
Dr. Toad started this thread
Quote:
Originally Posted by Pat494 View Post
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.
Quote:
Originally Posted by barjon View Post
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.

Quote:
Originally Posted by Pat494 View Post
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.

Quote:
Originally Posted by timsk View Post
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).
Dr. Toad is offline   Reply With Quote
Thanks! The following members like this post: timsk
Old Oct 24, 2015, 6:16pm   #56
The Staff are paid members that perform various roles such as editorial, advertising, support or technical work.
 
timsk's Avatar
Joined Mar 2002
Quote:
Originally Posted by Dr. Toad View Post
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.
__________________
I'm New To T2W - Where Do I Start? - a must read for anyone new to T2W
I'm New To TRADING – Where Do I Start? - a must read for anyone new to TRADING
The Trading Plan Template - a must read for anyone without a proper TRADING PLAN
Please note: I am part of T2W Admin' Staff - I am NOT a Moderator!
timsk is offline   Reply With Quote
Thanks! The following members like this post: Dr. Toad
Old Oct 25, 2015, 11:58pm   #57
Joined Jul 2015
Dr. Toad started this thread
Quote:
Originally Posted by timsk View Post
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 by Dr. Toad; Oct 26, 2015 at 4:17am.
Dr. Toad is offline   Reply With Quote
Old Oct 26, 2015, 7:52am   #58
Joined Feb 2002
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.
tomorton is offline   Reply With Quote
Old Nov 1, 2015, 12:12am   #59
Joined Jul 2015
Dr. Toad started this thread
Quote:
Originally Posted by tomorton View Post
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)...
Dr. Toad is offline   Reply With Quote
Old Nov 1, 2015, 7:22am   #60
 
Charlton's Avatar
Joined Nov 2003
Quote:
Originally Posted by Dr. Toad View Post
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/educatio...etting-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
__________________
Onwards and Upwards

Last edited by Charlton; Nov 1, 2015 at 7:37am.
Charlton is offline   Reply With Quote
Thanks! The following members like this post: Dr. Toad
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trade your way to financial freedom darth trader Technical Analysis 3 May 28, 2017 10:44am
JDTRADER £50 to Financial Freedom JDTRADER Trading Journals 25 Aug 18, 2010 4:14am
Van Tharping Our Way to Financial Freedom FetteredChinos Psychology, Risk & Money Management 10 Jul 4, 2005 9:48pm

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)