Trade Review - April 2019

I kind of took a little break in April. I wrote an @ES trading strategy using thinkscript and I made a tutorial for how to get started with it here, and because of how good the results have been I added futures support to my algo trading app.

It’s been interesting to say the least. A few winners and a few losers. I’m impressed with the results in thinkorswim so I’ve been paper trading it and making sure the trades line up between them. I’ve let my other stock algos trade but they seem pretty inconsistent, and I think it might be impossible to trade flags due to how often they dump. I decided to reverse the flag strategy and short and I’ll have to see how well that does.

I feel like at this point I should just trade @ES futures (or the micro contract when it comes out this month) because of how terrible stocks are. You can’t know if a particular setup will work on the next “hot” stock that pops up. At least with my @ES strategy it’s been somewhat consistent compared to stocks.

Besides algos, I’ve been slowly builing a position in $SDIV since it pays a nice monthly dividend and I’m not doing too much with my IB account. I have 75 shares at the moment and want to get more and hold for a while.

I think I will stop posting algo trade recaps since they’re only useful if I want to go back and see what it traded. If I start live algo trading again then I’ll definitely log them with screenshots and video logs. All trades are logged into a database anyway so I can see what happened.

That’s pretty much it. Still working on algos, but focused more on futures.



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

EZ WireGuard Setup

Keys

Generate keys on both the server and client.

1
wg genkey | tee privatekey | wg pubkey > publickey

Server

1
2
3
4
5
6
7
8
9
10
[Interface]
PrivateKey = <server private key>
ListenPort = 51820
Address = 10.0.0.1/24
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
[Peer]
PublicKey = <client public key>
AllowedIPs = 10.0.0.0/24

Client

1
2
3
4
5
6
7
8
[Interface]
PrivateKey = <client private key>
Address = 10.0.0.2/24
[Peer]
PublicKey = <server public key>
Endpoint = <server public ip>:51820
AllowedIPs = 10.0.0.0/24

Run

1
wg-quick up wg0

Daemon

1
2
systemctl enable wg-quick@wg0
systemctl start wg-quick@wg0

Headless Fluxbox / TightVNC

This guide is for Ubuntu 18.04. I needed a super lightweight GUI to run some applications without installing a full blown desktop environment and this seemed like a pretty good option. I would not recommend using this over the internet without an SSH tunnel.

  1. Install fluxbox and tightvnc.

    • apt install fluxbox tightvncserver xterm
  2. Run the VNC server manually on the user so you can set a password.

    • tightvncserver :0
    • tightvncserver -kill :0
  3. Edit /etc/systemd/system/tightvnc.service (change the user/group if needed)

    • 1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      [Unit]
      Description=TightVNC
      [Service]
      User=ubuntu
      Group=ubuntu
      Type=forking
      ExecStart=/usr/bin/tightvncserver -depth 24 -geometry 1440x900 :0
      ExecStop=/usr/bin/tightvncserver -kill :0
      Restart=on-failure
      [Install]
      WantedBy=multi-user.target
  4. Start.

    • systemctl daemon-reload
    • systemctl start tightvnc.service
  5. If you want to run GUI applications from outside VNC, export the display.

    • export DISPLAY=:0
  6. To add a custom menu edit ~/.fluxbox/menu

    • Add below [begin]
    • [exec] (xterm) {xterm}

Backtesting with thinkscript

I cobbled together a bunch of examples I found through Google into the samples provided below. thinkorswim is not that great for this, but it does allow you to visualize trades and get some idea of how well a strategy works. However, there is no way to fully auto trade a strategy. It’s possible to trigger an order based on a strategy being “true” but I would not recommend doing so. One thing to note is the sound alerts do not work and I haven’t found a solution.

Limitations

  1. Strategy can only be backtested on the chart duration it is applied to. This means a full backtest of years worth if intraday data is not possible unless you use the “OnDemand” feature.
  2. Strategy results window only shows basic trade P/L and a total P/L. No information about winning percentage or useful averages.
  3. Targets/stops end up trailing if the value changes (ATR in this case) and I haven’t found a way to make them static. I found examples to do that but they never worked properly.

Warning about stops. If you start seeing drastic improvements to your algos losses, make sure thinkorswim did not remove the price field from the stop loss order. This seems to occur when you save the strategy and it contains an error.

Creating a Strategy

The strategy will now appear in the “Price” window.

You should now see some trades on the chart. If not, it means your strategy has no trades or there’s something wrong with your stop loss/profit target prices causing it to only show up one time.

Backtesting

Now that you have a test strategy that shows up on the chart, you can backtest it to see the P/L. The first thing you will want to do is change the timeframe to as far back as possible. On the 5m, thinkorswim only allows you to go back 180 days. You can experiment with different timeframes and using the “OnDemand” feature to go back to certain years.

Right click on any entry, target, or stop and go to “Show report”.

And here are the results of the “Long Example” below starting on 4/13/19 going back 180 days on the 5m chart.

The strategy technically made money, however, it’s wildly inconsistent. Just because it made money in the end does not make it worth trading.

Long Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
input contracts = 1;
input rsi_length = 14;
input atr_length = 14;
input profit_mult = 2.0;
input stop_mult = 1.0;
input alert_text = "Long Example";
input use_alerts = {false, default true};
input alert_type = {default "BAR", "ONCE", "TICK"};
input alert_sound = {"Bell", "Chimes", default "Ding", "NoSound", "Ring"};
def rsi = RSI(length = rsi_length);
def atr = ATR(length = atr_length);
def condition = (rsi < 30);
# Long
AddOrder(tickcolor = Color.GREEN, arrowcolor = Color.RED, name = "Long", tradeSize = contracts, condition = condition, type = OrderType.BUY_TO_OPEN);
# Profit
def target = EntryPrice() + ATR() * profit_mult;
AddOrder(type = OrderType.SELL_TO_CLOSE, high[-1] >= target, tickcolor = Color.GREEN, arrowcolor = Color.GREEN, name = "Target", price = target);
# Trailing stop
def stop = EntryPrice() - ATR() * stop_mult;
AddOrder(OrderType.SELL_TO_CLOSE, low[-1] <= stop, tickcolor = Color.GRAY, arrowcolor = Color.GRAY, name = "Stop", tradeSize = contracts, price = stop);
# Alerts
def at = alert_type;
Alert(condition and use_alerts, alert_text, if at == 1 then Alert.ONCE else if at == 2 then Alert.TICK else Alert.BAR, alert_sound);

Short Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
input contracts = 1;
input rsi_length = 14;
input atr_length = 14;
input profit_mult = 2.0;
input stop_mult = 1.0;
input alert_text = "Short Example";
input use_alerts = {false, default true};
input alert_type = {default "BAR", "ONCE", "TICK"};
input alert_sound = {"Bell", "Chimes", default "Ding", "NoSound", "Ring"};
def rsi = RSI(length=rsi_length);
def atr = ATR(length=atr_length);
def condition = (rsi > 70);
# Short
AddOrder(tickcolor = Color.GREEN, arrowcolor = Color.RED, name = "Short", tradeSize = contracts, condition = condition, type = OrderType.SELL_TO_OPEN);
# Profit
def target = EntryPrice() - ATR() * profit_mult;
AddOrder(type = OrderType.BUY_TO_CLOSE, low[-1] <= target, tickcolor = Color.GREEN, arrowcolor = Color.GREEN, name = "Target", price = target);
# Trailing stop
def stop = EntryPrice() + ATR() * stop_mult;
AddOrder(OrderType.BUY_TO_CLOSE, high[-1] >= stop, tickcolor = Color.GRAY, arrowcolor = Color.GRAY, name = "Stop", tradeSize = contracts, price = stop);
# Alerts
def at = alert_type;
alert(condition and use_alerts, alert_text, if at == 1 then Alert.ONCE else if at == 2 then Alert.TICK else Alert.BAR, alert_sound);

Buy Open/Close (stocks)

Buy Close Sell Open

1
2
3
4
5
6
7
8
9
10
11
input Size = 100;
input OpenTime = 0930;
input CloseTime = 1600;
def condition = SecondsFromTime(CloseTime) == 0;
# Buy
AddOrder(type = OrderType.BUY_AUTO, tickcolor = Color.GREEN, arrowcolor = Color.RED, name = "Long", tradeSize = Size, condition = condition, price = dailyClose);
# Sell
AddOrder(type = OrderType.SELL_TO_CLOSE, SecondsFromTime(OpenTime) == 0, tickcolor = Color.GREEN, arrowcolor = Color.GREEN, name = "Target", price = dailyOpen);

Buy Open Sell Close

1
2
3
4
5
6
7
8
9
10
11
input Size = 100;
input OpenTime = 0930;
input CloseTime = 1600;
def condition = SecondsFromTime(OpenTime) == 0;
# Buy
AddOrder(type = OrderType.BUY_AUTO, tickcolor = Color.GREEN, arrowcolor = Color.RED, name = "Long", tradeSize = Size, condition = condition, price = dailyOpen);
# Sell
AddOrder(type = OrderType.SELL_TO_CLOSE, SecondsFromTime(CloseTime) == 0, tickcolor = Color.GREEN, arrowcolor = Color.GREEN, name = "Target", price = dailyClose);

Some additions you could make to these is seeing if it closed red or closed green on the day.

1
2
def dailyOpen = open(period = AggregationPeriod.DAY);
close > dailyOpen

or buy only on specific days of the week:

1
2
def day = GetDayofWeek(GetYYYYMMDD());
(day == 1 or day == 5)

Stops

Checking for a double top:

1
high == high[1]

Checking for a double bottom:

1
low == low[1]

Ticks for a stop loss:

Add/subtract the tick size from the entry price depending on a long/short trade.

1
def stop = EntryPrice() + (TickSize() * 4);

Filtering Open/Close Times

1
2
3
4
5
6
7
8
input OpenTime = 0930;
input CloseTime = 1600;
# Between open/close time
def timeframe = SecondsTillTime(OpenTime) <= 0 and SecondsTillTime(CloseTime) >= 0;
# Outside open/close time
def timeframe = (SecondsTillTime(OpenTime) > 0 or SecondsTillTime(CloseTime) < 0);



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Please remember that past performance may not be indicative of future results.

Trading Update - 9

Update 8

This post is dedicated to April trades. I won’t be doing a March recap post since I paper traded the entire time and have been tweaking it. The flags it trades are good, I think, so now I’m making sure the exit indicators work properly. I have started working on a shorting strategy that looks promising as well.

04/01/2019

  1. $MOMO. Two trades on this one today. First one worked perfectly and the second got stopped out break even.

No short trades surprisingly. I see $PHAS had a nice $12 wall which worked but was not taken because of the higher float.

04/02/2019
Flags

  1. $PSTG. Reminds me of the crappy stocks it traded last year with no volatility. Out for break even.
  2. $WDC. Got stuck at the half dollar so the algo sold early. It was definitely the right call as it dumped shortly after.

Shorts

  1. $MDR. Perfect setup however the stop was too tight. Worked exactly how I wanted otherwise.
  2. $STNE. Way too volatile and it got an insanely bad fill. Shouldn’t have been traded since the ATR is above the max I set. It did work eventually but the entry was horrible.
  3. $VKTX. Worked perfectly.

Couple bugs with stops but nothing major. I may change it to only short whole numbers if the stock is volatile. Half numbers actually seem decent but only if the volatility isn’t too insane.

04/03/2019
Flags

  1. $SGMO. Failed pretty much right away.

I feel like I need to rewrite my flag strategy but I don’t know what I would change. It trades the setup well but they seem really inconsistent.

Shorts

  1. $ON. Half dollar that didn’t work. It was close though.
  2. $GME. Basically top ticked the whole number. Could have gone for more on this one.
  3. $AMD. Quick scalp at the whole dollar.

It was also trying to short $ZYNE but IB had no shares and it worked perfectly too :(

04/04/2019
No flags.

Shorts

  1. $PVG. Didn’t quite dump enough to hit the target. Small profit.
  2. $I. Blasted through the short instantly.
  3. $LB. Perfect setup. Left some on the table but the volatility isn’t that high.

As I described on 4/2, one of the changes I can make is to not short half dollars if the volatility is too high. $I would have met that critera today.

04/05/2019
Flags

  1. $WLL. Top ticked the exit.
  2. $TGI. Instantly failed. I’m surprised it was taken since the top was at a whole number.

Shorts

  1. $ZYNE. IB had shares finally. Got stopped out pretty quick. It was close to getting the top.

Pretty slow day for shorts. I may rewrite my flag strategy this weekend to see if I can simplify it.

04/08/2019
Slow day. I added $SPY and $TQQQ to the short symbols list to see if it ever trades those and how well they perform.

Shorts

  1. $NBEV. No shares at IB. It was close to getting the big drop. This stock is impossible to trade due to the insane amount of shares it trades when there’s news.

04/09/2019
More trade war crap today. Really slow this morning besides $ATAI.

No trades. Barely anything going on again.

04/10/2019
I loosened up some of the filters for the shorting strategy to see if has any trades that work on higher priced stuff. Very slow day again.

Flags

  1. $AMRS. Got out on the next candle when it topped. Almost break even.
  2. $ZAYO. Same as $AMRS. Small win.
  3. $ATAI. Dumped first before going.

Shorts

  1. $ZAYO. Shorted the half dollar. Stopped out break even.

04/11/2019
The last few days I’ve been working on an ES long/short strategy using thinkscript since it allows you to easily visualize the trades and gives you a basic P/L for the time period you’re looking at. It looks promising so I want to add futures support to my trading app and automate it to see how it does going forward.

Barely anything going on. No trades except for ES.

04/12/2019
No flags.

Shorts

  1. $PE. Got a little dump then it broke out again. 10m later a massive crash.

Slow day again. I’ve been working on an ES strategy in thinkscript and porting it to my own algo when the results look good. I just need the setup to appear a few times so I can make sure everything works properly. So far I really like futures. Stocks just seem so unpredictable and fitting a strategy to the one that pops up for the day is really hard. There will be a micro futures contract for the S&P 500 next month so I’ll look into trading that instead of ES so there’s less risk.

04/15/2019
Flags

  1. $ADNT. Crap.

Shorts

  1. $ADSW. Perfect.
  2. $ADNT. Perfect.
  3. $CTLT. Nice drop then it spiked and got out break even. Not bad.
  4. $EFII. Crap. Massive crash after it went parabolic.
  5. $JMIA. Crap. Little dump at the half dollar.

The early shorts were incredible then every trade after was crap. I’m more interested in my ES strategies now since stocks are less predictable.

04/16/2019
No trades. $TIGR set up for a short but no shares available. Even ES was pretty slow today.

04/17/2019
Slow day but some nice ES trades.

Flags

  1. $LB. Total crap but got out break even.

Shorts

None.

04/18/2019
Market is closed on Friday. Some nice ES trades during premarket.

Flags

  1. $WTR. Stopped out right away. Eventually got going. Stop was too tight for a win.
  2. $HUYA. Stop was too tight again. Would have almost hit the target

Shorts

  1. $AMRS. No shares. It would have gotten stopped out anyway.

04/22/2019
Lately all of the flags and shorts have not worked and I feel like I’ve slowly moved on after seeing my ES strategy work consistently. It does not seem possible to make a strategy for random stocks that are active unless it is extremely specific. I would need to rewrite my flag algo to be more specific but then it might not ever trade. It would take a long time to get a large enough sample size to know if it works or not, and then it might only work during earnings or vice-versa.

For ES, the pattern shows up at least once per day and has been consistent. I’m still fixing a couple issues with it where it doesn’t take the same trades as the thinkscript due to indicators returning bad data. But so far every trade has been amazing. Hopefully it works on the micro contract when that is released otherwise I could take the trade manually on it instead.

Flags

  1. $RCII. Dumped.
  2. $WLL. Double topped so got out break even.
  3. $CRZO. Almost hit the target. Finally one that worked.

04/23/2019

Flags

  1. $HOME. Dumped pretty quick.

04/24/2019

Four ES trades today. Two were OK in the early morning and the other two were perfect.

Flags

  1. $STNE. Perfect.

04/25/2019

Some ES trades but nothing else.

04/26/2019

No ES trades today.

  1. $CRON. Dumped.

I feel like I have to reverse my bull flag algo since it’s insanely accurate about the stock going down. The first candle to make a new high ends up being the perfect short entry with a stop at the high of day.

04/29/2019

Small win on ES.

I reversed my bull flag strategy

Short flags

  1. $ROAN. Went a little bit too far so it got stopped out.
  2. $JMIA. Broke the high of day slightly then dumped. Perfect, just needs a stop loss tweak.

Shorts

  1. $BE. Ran hard after the entry.

04/30/2019

No ES trades.

Short flags

  1. $WDC. Didn’t really do anything after the entry. Consolidated then dumped. Tiny loss.
  2. $WW. Perfect setup. Dumped for 30m+.

Trade Review - April 2019



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Please remember that past performance may not be indicative of future results.

Potential Strategy - Overextended Short

I’ll start off by saying this is nothing new and Kunal Desai has written blog posts about a similar strategy involving bollinger bands. Unfortunately, I cannot find the link to it but I did see it while researching bollinger bands and stochastic RSI.

I’m subscribed to GDT on YouTube and during one of his recap videos it connected a few dots. What he has been doing lately is shorting extreme spikes expecting them to pull back enough to have a profit.

The particular stock in the video was $CPRX on 3/27. It spiked into $5.50 resistance (half dollar) then pulled back allowing for a quick 20c gain. And that’s what clicked in my head. Shorting into a whole or half dollar number - since it’s just psychology. People love to sell at or short at whole/half numbers.

I wrote a quick strategy to trade that stock then rewrote it the next day to simplify it. On Friday there were a few losses but also one giant gain that wiped out all the losers.

Let’s take a look at that nice gain on Friday. $WTW spiked very sharply near the open into a whole number. The algo shorted it at $20.98 with a stop of $21.05. It was out within the next 5 minute candle for an easy win.

The goal of this strategy is to short into a wall of resistance and get out as quickly as possible for a win. Even though this stock dumped for hours that may not be the case for each trade. I only have a small sample size at this time, so I may need to change that in the future in case this strategy really works.

The Requirements

  1. Must be at the whole/half number (within 2c on either side of it).
  2. The candle high it shorts needs to be outside the upper bollinger band.
  3. RSI must be above 70.
  4. Stoch RSI must be above 80.

Some tweaks I may consider:

  1. Whole numbers only (half numbers may not be as consistent).
  2. Daily resistance (could increase odds).

$WTW 5m candles

I’ve since added support for finding resistance on the daily chart (can be toggled) that coincides with the whole/half number. In theory that should increase its odds of having a win.

As you can see from the chart below, there was indeed resistance on the daily chart at $20.99. It’s never exactly the whole/half number and it’s more of a range like within 15c.

$WTW daily chart



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Please remember that past performance may not be indicative of future results.

Trading Update - 8

Update 7
February Trade Review

This post is dedicated to March trades. I paper traded most of February and modified the algo a bit to fix a few bugs and add new exit indicators. See the “Februray Trade Review” link above to find out what I changed. I plan to paper trade for at least the first week March if not more.

03/01/2019

  1. $LB. Traded this one before. Small move then crashed. Worked eventually so I think I need to use the 9 EMA if it’s lower as the stop.
  2. $FTCH. Also traded this one before. Dumped pretty quickly.
  3. $VFF. Another instant dump.
  4. $OSTK. Nice looking setup that dumped. Usually flags work on this stock.

Friday’s just seem to be terrible in general. Most likely when I go live again I’ll skip Friday entirely.

03/04/2019
Not watching many stocks by end of day. There were a few that popped up but didn’t meet the risk/reward or failed before making a new high. I’m using the 9 EMA as a stop or a previous low so the risk/reward must be much higher in order for a trade to occur.

  1. $SE. Late day flag and it worked. My algo did sell it sooner than usual because it got super close to the target and didn’t get over quick enough. It needs some adjusting to wait several seconds then sell but it does work. Nice win.

03/05/2019

  1. $SE, again. No fill and if it were live I doubt it would have gotten it. It did end up working.
  2. $SE. Second flag failed.

03/06/2019
No trades. $BPTH would have been taken but the R/R was bad. The backtest shows a 1.45:1 risk/reward which is good so maybe I’ll use the last close price instead of the high for the calculation during live trades. It should have been taken which is weird.

03/07/2019
It was going to take $BPTH early in the morning today but the R/R was just awful and I’m glad I added that. The downside is multiple dollars and the reward I programmed is not capable of more than about $1 max.

  1. $YEXT. Good setup, break even though. It did double top so maybe I need to look back a couple candles before the entry. Eventually hit the target.

So far no dumb trades this week. Could just be from the market dumping and these are the only ones that met the requirements. Tomorrow is Friday which has been god awful lately. I did make a few changes after the last one so maybe it will do better.

I updated the crypto datasets if anyone cares.

03/08/2019
No trades. Pretty slow day in general.

03/11/2019
$WDC was setting up and would have worked but the risk was too high for it to trade.

No trades.

IB did something with TWS in the latest update that caused the charts and the entire application in general to be extremely laggy, and it has nothing to do with memory leaks this time around. 974 seems to be fine and luckily I had that older standalone release in a VM.

03/12/2019

  1. $PYX. This turd never works. It bought right into daily resistance. I’m not sure if I can determine if there is resistance other than looking at the highest high over the last 30 days or so.

03/13/2019
$NTNX in the morning but risk/reward was bad.

  1. $SLDB. Another failed flag that eventually hit the target.

I don’t know what I’m missing. These setups all look pretty decent to me yet almost all of them dump.

03/14/2019
Nothing going on again. I paper shorted $BOXL as it spiked into resistance. First entry was a bit early then I added higher into 4.18 which was just about the high. Really nice trade.

No trades.

  • I’m going back to previous low as a stop since the 9 EMA tends to be really far away. In the case of the EMA, it ends up taking even smaller positions and gets stopped out anyway. It doesn’t seem to matter.
  • I made some backtesting changes to make things a lot easier to test “waiting” a set amount of time before selling when a double top occurs. Eventually I want to add resampling 1m candles instead of ticks so I can backtest days at a time for faster results.

03/15/2019
Friday! Still not much going on. $SLNO had a flag that occurred the earliest I’ve ever seen. It did work but was not taken because it broke the 9:30 high candle.

No trades again. I tweaked it some to support super early flags but it still wouldn’t take it if the risk/reward was low.

03/18/2019
Both of these morning trades got stopped out due to a bug. What happened is they topped and failed but eventually broke out then it sold because the time of the tops was not cleared. Always good to find bugs like these before trading live.

  1. $VFF. Slow but worked perfectly and hit the target. Top was 5c higher.
  2. $AA. Got a little move but just couldn’t make it to the target.

03/19/2019
No trades. It was not watching much from the scans so probably not a whole lot going on. $AMD managed to spike and of course it didn’t crash enough yesterday to fill me.

03/20/2019

  1. $WLL. Stopped out break even as it tapped the stop then ran.
  2. $NTNX. I was in the shower for this one. Perfect.

I’ll test moving the stop to break even later on and using the 9 EMA instead if it’s up enough. I still don’t have an idea of the ideal amount of time to move a stop or even what price to use besides trailing an EMA.

03/21/2019

  1. $SOLO. Rejected $5 so it got out for a 51c loss.
  2. $NTNX. Sold on the same candle due to a double top. I may change it to ignore the entry candle since that is not enough time to determine an exit.

One it did not trade was $SCON due to the scan price limit I have set. The exit indicators I have seem to work pretty well.

03/22/2019
Big sell off today and it’s not watching many stocks so I doubt there will be a trade.

No trades.

This week has been great. Couple bugs but all the trades worked to a certain degree. $NTNX was perfect.

03/25/2019

  1. $DSW. Nice.

03/26/2019

  1. $DCAR. Almost instant dump. 200 EMA resistance it looks like.

I’m starting to wonder if flags don’t work that well on low floats. $DCAR doesn’t even have a float on IEX because of so many reverse splits. I may add a “0” check just to filter more junk. The 200 EMA check should have worked but it was off by like 2c, so I’ll also check the last candle and not just the high of day.

03/27/2019
Pretty slow so no trades.

I’ve been adding new features to my trading app when the market is closed. I’ve added things like supporting different timeframes which is useful if a strategy works better on something other than the 5m. I’ve also started working on another strategy that shorts into whole/half dollar resistance when it’s super extended. I noticed a lot of stocks top at those levels so might as well see if I can write a strategy for it. It seems promising but I won’t know until I test it during market hours.

03/28/2019
Slow again.

  1. $KNX. Stopped out break even due to a half dollar top.

No short trades on the new strategy. I actually decided to rewrite it to simplify things a bit.

03/29/2019

  1. $HTHT. Decent setup but the prior candle dumped before making a new high on the next one. It sold for a small loss.
  2. $VKTX. Got a small move before dumping.
  3. $AMRN. Perfect setup and nearly top ticked the exit.

These next ones are the whole/half dollar shorts.

  1. $WDC. Instantly stopped out.
  2. $TGTX. Off a little bit before getting a pullback.
  3. $WTW. Absolutely flawless. Top ticked the whole number at 21 and caught most of the dip. This trade made up the losses of the other shorts and more.

The ones that did not work seem to be from half dollars which is less significant resistance than a whole number. I’ll have to wait for more trades to see if I should only short whole numbers or not.

Weekend

This weekend I worked on a few things related to the short strategy.

  • Half dollars definitely seem inconsistent when it comes to resistance (at least from my limited sample size). I still want to trade them to get more data.
  • Looking at daily resistance that coincides with a whole number top and it being extended intraday seems to yield better results. $WTW fits that critera perfectly.
  • I went back and looked at $AMD which has been topping at $27.00 on the 25th and 26th at the open. This coincides with daily resistance from the 20th.

It’s still a relatively simple algo that has the potential for large gains. Have to see what happens on Monday.

Update 9



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Please remember that past performance may not be indicative of future results.

Trade Review - February 2019

February was pretty slow and I decided to paper trade for almost all of it so I could work on the algo some more. Small caps were so incredibly dead that it was rarely watching more than 15 stocks by 10:30 AM. I decided to increase the market cap from 1B up to 10B and eventually 15B just to see what it would trade.

A lot more trades were made due to this and I found a few problems.

  1. Low volatility stocks were being traded even though the ATR was good on all the candles. I added a percent ATR filter which seems to have helped.
  2. Risk/reward was poor on many setups so I added a R/R filter based on the stop and profit target. This actually filtered a lot of losing trades out. I decided on a 1.25:1 reward/risk. 2:1 or higher is ideal but sometimes you just can’t get that based on the stop and target. There are some where 1:1 is the best you can do and they work out perfectly.
  3. Since this algo only trades flags, the high candle needs to be above most of the previous 5-6 candles. I previously had checks in place for this but they were not functioning the way I wanted. I made a small change to skip the last 3 candles instead of 2 which seems to have worked. This is very difficult to test because I do not have many examples.
  4. Lastly, new exit indicators. I have double tops and topping candle checks, but those only cover certain scenarios. I added a new double top check that goes back multiple candles instead of only checking the last two. Another scenario is what happens when the stock misses the target by just a few pennies without blowing through it. It should probably sell it, right? That happened on $ZSAN on the last day of February (although it was not traded due to the bad R/R).



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Trading Update - 7

Update 6
January Trade Review

This post is dedicated to February trades. The algo has not been modified except for some small bug fixes. Both algos that I described previously are being traded.



02/01/2019
$SPY has been really strong the last few days due to the fed not increasing rates. Not a whole lot stands out to me during premarket except $TTNP but it’s too low for the algo to trade at the moment.

I’m pretty tired so I’ll let it trade until 11:30-12:00.

Not a lot going on besides the $TMSR halt craziness. Hopefully that sets the tone for next week. Stopping at 11:00. No trades.

02/04/2019
$SPY is sideways during premarket with no gap. Could go either way. The State of the Union is tomrrow. I hope it doesn’t tank the market like it did last year. I may skip tomorrow and Wednesday depending on how volatile things are. My sleep schedule is pretty weird so I’ll go until 12. I’ve got some sinus pressure like I described in my January post from being sick. I feel way better than the first week of being sick so it’s progress.

Pretty slow but there were some trades. Unfortunately none really worked. $MNGA had a nice runup on some news but couldn’t break out of the flag. $AXSM had a really nice flat top flag but ultimately failed. I’m going to stop at 11 since there’s not much happening. $SPY was chopping around a bunch so I think I’ll just wait until Wednesday or Thursday depending on how the market reacts.

Down about $11 today. Not a lot but it keeps getting more difficult to make up the losses. I’d like to try swing trading $AMD more based off the daily chart but it has to pull back first.

$MBOT and $PYX also had failed flags.



$MNGA 5m/1m candles

$AXSM 5m/1m candles

02/05/2019
$SPY gapped up a bit so I’ll let it trade today. Not sure about tomorrow though. I don’t see much happening so there might not be a trade.

It’s watching 5 stocks by 10:00 and I’m not seeing anything moving. I’ll stop at 11.

Got a trade on $EOLS. It looked like a good setup but it refused to breakout. I was never up on it more than 5c. Algo sold sooner than the stop because of multiple topping candles.

Stopping at 11 due to nothing going on. I’ll let it paper trade.

It paper traded $EOLS around 12:30. Easy win. If I kept live trading it would have made back the loss and been up $4.



$EOLS 5m/1m candles

02/06/2019
Assuming the entire market doesn’t collapse, I plan to trade the entire day. By only trading a few hours per day I am limiting my potential winners. This was proven yesterday after it traded $EOLS again after I had stopped trading live. It made back the gain and more to the point of profitability. I increased the “trade rate” filter from 25 to 50 to make sure the stocks it’s watching are very active.

Only watching 11 stocks by 10:30 and I don’t see much happening.

Today is extremely dead and I want to work on another project so I’ll let it paper trade while I sleep.

No trades. A few were popping up but they failed.

02/07/2019
Big gap down in the $SPY. I don’t see much moving besides weed stocks.

This week has been really crappy. Either Friday starts getting good again or maybe next week.

Only watching 11 stocks by 12 so I’m going to stop it and work on other things.

Not even a paper trade today. I did see a nice $EOLS flag today but it did not meet the requirements. All the volume came in on that single bar. It didn’t matter in this case.

02/08/2019
$SPY is down again so we’ll see what happens.

Nothing going on by 10:20 so I’m just going to paper trade so I can do some other things. I’d really like there to be some crazy runners like $VTVT last year with perfect flags.

02/11/2019
Not much going on again.

Small caps are extremely dead so I’m going to experiment with paper trading by allowing it to trade higher market caps (up to 10B vs 1B).

  1. $EOLS hit the scan and the flag looked great. I manually took it and the algo did a few seconds later. Worked OK but got stopped out for a profit when it moved the stop to $28.97 (whole number stop).
  2. $UNVR drifted down and got stopped out. Stocks like this are why I hate large caps. Nice setup and it just slowly doesn’t work.
  3. $AXGN later in the day. I believe that particular setup requires a small change to make sure candles aren’t completely outside the body of the high.

There is significantly more junk after upping the market cap. This means I also need to increase my other filters like volume and trade count/rate.

02/12/2019
I’m going back to paper trading for the week since I have tweaked the scans and changed the algo slightly to make it hopefully trade better setups.

  1. $CRON. Took a while but hit the target.
  2. $ROKU. Really slow but hit the target after 25 minutes.
  3. $BHF. No fill. This one it definitely missed. Entry was 40.14 and the bid/ask was already 40.15 x 40.20. Plenty of time to get out for a small win as it formed a \/\/ top.
  4. $MAT. Too much resistance near $17. It was nearly identical to the $BHF setup.
  5. $CRON again.
  6. $APHA. Another weed stock at the same time as $CRON. Not as good of a setup since the “high” candle is not above the previous candles.
  7. $BWA. No fill.

So, the early trades were OK but it gave back everything by making multiple trades that didn’t fit the pattern. I’ve fixed those issues and in fact it should have taken $EOLS on 2/7. I hate tweaking the algo constantly because it’s a never ending process but it seems necessary in order to not trade garbage setups.

02/13/2019

  1. $CVE. This exact pattern showed up yesterday on multiple stocks. It seems like this setup is a perfect short opportunity. Float is 1B which is nuts. Sold break even after it topped a bunch. I’m adding a float filter using IEX to avoid 350M+ floats. It ended up hitting the target about an hour later.
  2. $AVLR. Got filled at the top of the candle due to terrible spreads (probably would have gotten somewhere in the middle if it wasn’t a paper trade). Decent win on it.
  3. $LSCC. I was in the shower when it took this one. Only a 10c move but that’s still a win. It topped at 10.50 so it got out. That was the right call because it’s drifting back to the entry.
  4. $CRC. Algo sold for a small loss due to it topping at $19.00. Eventually it got going and ran way past the target.

Pretty decent today. On another note, IB added a few lines to the TWS VM options file and it may have fixed the annoying lag problems I had.

02/14/2019

  1. $TGE. No fill. I may lower the “no fill” delay so if it doesn’t get filled immediately there’s no trade.
  2. $IVC. Failed completely. Eventually hit the target but took many hours. It’s a really nice pullback setup but it shouldn’t have been traded because the high candle was not extended.
  3. $MYOK. Break even. Probably moved the stop too soon. Hit the target eventually.
  4. $GSUM. No fill but if it were live I’m pretty sure it would have since there were lots of orders at the entry. Hit the target of 3.82 and then some.
  5. $GSUM. No fill again. It missed the target by 1c which is just crazy.

One it did not trade was $MRO which had a real nice flag after the daily breakout. It wasn’t on the scan because of the 13B market cap and the float being huge. Still a nice trade. I looked at the 1m chart and it was never down after the entry.

1
2
3
4
5
6
[02/14/2019 10:10:00] Entry 41 @ $16.74, target $17.02, stop $16.62 [ Bull Flag ]
Trailing stop: 16.62, 16.77
[02/14/2019 10:30:00] Exit @ $17.03 [ $0.29 ]
Drawdown: $0.13 / -0.77%
Max profit: $0.29 / 1.73%
P/L: $11.89

02/15/2019
Friday! If the changes do OK all next week I may go live with it the week after.

  1. $SAEX. Failed almost instantly. Nice setup though.
  2. $YETI. Went up a little, double topped, dumped. Algo sold it sooner so the loss was less.
  3. $PYX. Nice looking setup but failed. It crashed hard then eventually came back to the entry.
  4. $SAEX again. Instantly stopped out. Dumped really hard, and that’s why you have stops.

Pretty slow day. Not sure if all Friday’s have been like this or it’s just slow.

I want to add a risk/reward value so I can make sure the reward is there otherwise there’s no point in going for 1:1 or even less. Also I was thinking about looking at average green candle vs. average red candle sizes to see if that would improve accuracy.

Market is closed on Monday.

02/19/2019
One trade on $RIOT. I think I need a 200 EMA check because it ran straight into it and dumped. Nothing else.

02/20/2019
I increased the market cap to 15B to see what it’d do. I slept while it paper traded and they were all pretty good.

  1. $I. OK trade, got out when it double topped.
  2. $NVTA. Choppy flag, small loss.
  3. $CRON. Awesome setup, basically top ticked it.
  4. $X. Steel company. Tiny winner. Perfect exit since it dumped right after.
  5. $HUYA. Nice setup and it was underestimated severely.

Some really nice trades today with only a single loser.

02/21/2019
No trades. A few were popping up but by the time it made a new high it didn’t meet the requirements or the risk/reward wasn’t good enough.

I’ll probably give it another week to see what it does then go live. I don’t want to have only a weeks worth of trades to go off of.

02/22/2019

  1. $INFN. Stopped out break even.
  2. $AAOI. Late day flag. Dumped first then ran so stopped out for a loss. Kind of annoying how a stock has to crash out of a flag before it finally goes.

02/25/2019

  1. $LB. First pullback which looks great then a giant dump.
  2. $AAOI. Lost on this one on Friday but it won this time. Barely.
  3. $CIFS. Another decent looking setup that failed before getting to the target.

I’m starting to lose hope and maybe I should just reverse the strategy to short it first with a stop at high of day. Every gain is small and every loss is large. If it wins every trade like on the 20th it’s still smaller than two average losses.

02/26/2019

  1. $FTCH. Finally one that worked. It didn’t go instantly but did hit the target. Didn’t get a fill but it should have with a live account.
  2. $SOLO. Instantly dumped. Looking back at it there’s a nice morning flag that did work but was not traded. Hm.

The winners did outweigh the losers today.

02/27/2019

  1. $MDR. Garbage.
  2. $ENPH. Another turd. I’ve seen this one run far in the past.
  3. $OSTK. Extremely slow but hit the target. First flag wasn’t taken due to high RSI.

I’m still finding issues where the candles aren’t up high enough to buy. The second bad flag it traded on $OSTK was garbage even though it worked eventually. I added the RSI > 79 check to filter out really extended junk but that caused it to miss the first flag. I think that indicator is useless for algo trading.

02/28/2019
I’ll write another recap post for this month soon.

  1. $CRON. Stopped out break even. Not a bad trade.
  2. $HZNP. Finally got a move but it couldn’t hit the target. Break even. Many chances to sell for a profit on this.

Quite a few in the morning that did not have the right risk/reward. $ZSAN would have worked but missed the target by 3c.

Trade Review - February 2019



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.

Please remember that past performance may not be indicative of future results.

Trade Review - January 2019

I’ve learned quite a bit from letting my algo trade during January. It started off pretty good with a couple of small winners which is exactly what I wanted. I then had a few losses that spiraled out of control and forced me to size down after I started to sabotage myself.

After a string of bad trades I went back to paper trading and had some gains which is super annoying. The week after that I got sick and had to take two weeks off in order to fully recovery. During that time I was paper trading still and some worked out.

It was a pretty rocky month with only 2 full weeks of trades at the beginning. I’m ending it down about -$25 which is unfortunate but I should be able to make that up eventually.

Here’s to February being much better!



Disclaimer

I am not a registered financial adviser/broker/anything. Use this information for entertainment/informational purposes only. Any tickers mentioned are not recommendations to buy/sell/or sell short. They are used as examples only.