Trading Update - 4

Update 5 - Bull Flag 2 Trades
Update 3 - Bull Flag 1 Trades

As I said at the end of the previous update, the market got extremely weak the moment I started logging the trades. The patterns were all pretty good but it just could not get enough out of each one to hit the targets. There were still some solid winners but they were rare. I know this pattern is valid since I’ve seen it get massive wins on multiple occasions. Sometimes it feels like I’m predicting the future, but due to market conditions or the scans I’m using they do not work consistently at the moment.

P/L: $84.42
Wins: 7 46.67%
Losses: 8 53.33%
Break Even: 5 25.00%
Wins + BE: 12 60.00%
Trades: 20

Results

The stats appear pretty bad in my eyes. There are more losers than winners but that doesn’t tell the whole story since the P/L is profitable. If you factor in the fact that 25% of the trades were break even it’s not as bad. Break even means the stock moved up enough (15c) for the algorithm to move the stop to the entry price.

After seeing so many break even trades I added a “weak market” flag that I can toggle. This lowers the price targets and increases the minimum volume required. With this flag set: $NDLS, $QNST, $PYX, $SPAR, $DRYS are all removed. $ACRS becomes a tiny win, $VTVT first flag is a win, second is a loss but the profit is higher, and I can’t test IGC since it has been delisted - most likely the first one would have won and second a win since that’s what happened when it traded it.

This bumps the win rate up to about 65% but there is no way to actually know if that is accurate because the scans are now different. I will need to test the modifications and log them.

I am going to make a few changes to the algo in my next iteration of tests:

  1. Never trade Greece shipping stocks. They are literally always shorts due to all the bag holders from 2016 onward.
  2. Increase minimum scan volume to 500K. This would prevent the $PYX trade and $SPAR. Possibly others.
  3. Add scan filters now that the TWS API has support for it. Trades, volume USD, and shares outstanding (instead of just market cap).
  4. Apply my volume tweak to trade stocks where the pull back volume is a little more than the large move candle.
  5. Enable my “weak market” tweaks which take profit sooner and move the stop so there’s at least 1c of profit after commissions.

Today alone it traded $CLVS (win), $PXS (win), and $HUYA (break even) with the modifications. Not bad so far. I’ll start logging these in a new post.



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.

TWS API - New Scan Filters

In the beta release of the TWS API there are now custom scan filters that you can apply. This functionality mirrors what is available in TWS so now it can all be done through the API. This should make filtering out junk way easier.

To get this you need to apply for the private GitHub repository by signing a form. Eventually this should make its way into the “latest” API version.

Some really important ones:

1
2
3
4
usdVolumeAbove
tradeCountAbove
sharesOutstandingBelow
stkTypes

TWS API Sample Application

Benchmarking KVM/ZFS on Ubuntu 18.04 (raidz2)

Host

  • Xeon E3-1230 V3 @ 3.3GHz (turbo off)
  • 32 GB DDR3 1600 MHz
  • Supermicro X10SLM-F
  • 4 x 1TB Seagate Constellation ES.3 (raidz2)
  • 128 GB Samsung USB 3.1 flash drive (host)
  • vm.swappiness=0 / vm.vfs_cache_pressure=50
  • ksm, hugepages, zwap
  • CFQ scheduler
  • Ubuntu 18.04.1 x64

I redid some of the tests with an mdadm RAID 10 array of 240 GB SSDs and the results were nearly identical. It’s possible the virtio drivers or Windows version I used was causing strange storage performance.

I re-ran none/threads under a Debian 9 host / Server 2008 R2 and the sequential reads/writes are great. 1455 MB/s / 548 MB/s sequentials. Everything else looks good too. Very strange.

I don’t intend to use ZFS for VMs at the moment due to lack of encryption support and some annoyances like Ubuntu not booting half the time because ZFS datasets won’t mount correctly.

VM

  • 4 cores / 4 threads
  • 8 GB RAM
  • 120 GB zvol / qcow2, lz4, relatime
  • virtio
  • No page file, optimize for programs, DEP off
  • Windows Server 2016

I’ll be using CrystalDiskMark (CDM) for benchmarking under Windows.

zvol

none / threads

Memory usage spiked up to 30.9 GB and crashed the host while doing the write test.

writeback / threads

Remote desktop died but the test continued. Memory usage kept hitting 17 GB from 12.8 GB.

writethrough / threads

I can immediately tell that this is faster than writeback. The VM started quicker and loaded the server config tool faster. However, the write speeds are absolutely awful. Memory usage was a consistent 12.8 GB during the entire test.

This seems close to what an individual drive is capable of except the sequential writes should be a lot higher. Strange.

directsync / threads

Appears to be really fast just like writethrough. I remember testing this option before with mdadm RAID 10 under a Linux VM and it was extremely slow. With ZFS it appears to be different. Consistent 12.8 GB memory usage as well.

Overall it looks like the performance is slightly worse than writethrough.

unsafe / threads

This is supposedly similar to writeback. However, the OS and programs loaded faster than writeback. Memory usage peaked around 14 GB which is lower than writeback.

https://www.suse.com/documentation/sles11/book_kvm/data/sect1_1_chapter_book_kvm.html

none / native

This is the option I use on a production server. I had severe performance issues while doing lots of random I/O in a Linux VM with “threads”.

Memory usage peaked at 30 GB. It slowly came down as it was flushed to disk. Sequential write speeds are that of a single SATA 3 hard drive. Even though it is higher than ‘writethrough’ from above, the test took longer to complete.

So far this option appears to be the best

directsync / native

Took forever to boot. Not worth testing.

qcow2 on dataset

1
2
3
4
5
zfs set compression=lz4 local/vms
zfs set xattr=sa local/vms
zfs set recordsize=8K local/vms
qemu-img create -f qcow2 -o preallocation=full server2016.qcow2 120G

none / threads

Not supported.

writethrough / threads

Similar performance to the zvol.

writeback / threads

Reads are half compared to the zvol with writeback. Writes are a little better than a standard hard drive. Memory usage dropped when the write test started. ZFS freeing the cache?

unsafe / threads

Reads are slower than writeback but sequential writes are slightly improved. Windows appears to be snappier using unsafe no matter if it’s a zvol or qcow2 image.

native

Not supported.

Schedulers

The tests above were conducted using the default cfq scheduler. I will only be testing zvols for this part.

noop

This is usually the best scheduler for SSDs and not spinning disks.

none / native

Ran out of memory. native with no cache does not appear to be safe with limited memory.

writethrough / threads

Sequential reads are a lot higher because the requests are not being re-ordered. Writes do suffer.

noop

unsafe / threads

noop

deadline

writethrough / threads

Marginally better than noop. In theory this scheduler should be better suited towards VMs than CFQ when lots of requests are being made.

deadline

unsafe / threads

No real difference between noop and deadline for this.

deadline

bfq

I’m not sure if I got it working correctly. After I enabled the kernel option all of the other schedulers were removed and the VMs were very slow. I’ve used it on Arch before and never noticed anything weird.

Conclusion

unsafe is clearly the fastest and best option if you want speed without caring about data integrity. writeback is fast but it uses more memory.

qcow2 is slower than using a zvol but has some benefits like thin provisioning and being able to specify an exact file name. With zvols they sometimes change on reboot.

writethrough is surprisingly snappy in Windows despite the write tests showing poor performance.

native offers good performance according to CDM however memory usage will peak and slow the performance. This option causes Windows and programs to load slower. Simple benchmarks are not telling the whole story. It may cause the host to crash which means I would not recommend using it.

No matter what option you use, read performance is good with zfs + KVM. It’s always the writes that are the problem.

Trader Workstation - Automatic Start (Paper Trading)

TWS automatically logs out after about 11:45 PM. They recently added an automatic restart feature to the beta release but I have yet to get it working.

Since I am just paper trading to test algorithms I found an AutoHotKey script that will start/reopen TWS and login when the process disappears. I decided to write my own using Powershell so it works on all Windows systems without needing to install something.

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$sig = @"
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr FindWindow(String sClassName, String sAppName);
[DllImport("user32.dll", CharSet = CharSet.Unicode)]
public static extern int SetForegroundWindow(int hWnd);
[DllImport("user32.dll")]
public static extern int SendMessage(int hWnd, int hMsg, int wParam, int lParam);
"@
$fw = Add-Type -Namespace Win32 -Name Funcs -MemberDefinition $sig -PassThru
function Get-TWS {
return Get-Process -Name "tws" -ErrorAction SilentlyContinue
}
function Start-TWS {
$proc = "C:\Jts\tws.exe"
$app = Get-TWS
if(($app) -eq $null) {
$app = Start-Process -PassThru $proc "username= password="
}
return $app
}
if ((Get-TWS) -eq $null) {
$app = Start-TWS
Start-Sleep -s 60
$next = Get-TWS
if ($next.ID -ne $app.ID) {
Stop-Process -Id $next.ID
Start-TWS
}
Start-Sleep -s 30
$hwnd = $fw::FindWindow("SunAwtDialog", "Warning")
if ($hwnd -ne 0) {
$WM_KEYDOWN = 0x0100
$VK_RETURN = 0x0D
$fw::SetForegroundWindow($hwnd)
$fw::SendMessage($hwnd, $WM_KEYDOWN, $VK_RETURN, 0)
}
}

Use task scheduler to start this script when you want it to open. I then start my custom algorithm process about 10 minutes later.

1
2
Program/script: powershell.exe
Add arguments: -ExecutionPolicy Bypass <.ps1 script path>

Make sure the trading mode is set to paper inside C:\Jts\jts.ini.

1
tradingMode=p

Trading Update - 3

I believe I finally have something usable that trades 5m bull flag setups with high accuracy. I have been letting it paper trade for weeks now and just recently got it to what I’d consider “tradable”. It took months of learning how to code a strategy that would have the proper entries, exits, and stops. Not to mention the numerous bugs that caused it to exit trades too soon or not trade certain flags at all.

I am no longer making modifications to the algo, so from this point forward I plan to log a minimum of 20 paper trades to find out its accuracy and how profitable it is with small positions. If I am satisfied with the results I will then trade my live Interactive Brokers account in the coming weeks. Each trade seems to work in one of two ways: it makes an unbelievable gain that I never thought would work, or it gets stopped out quickly for a small loss.

I will be logging all of the trades it makes below, good or bad. I also plan to record the trades and upload them to YouTube like I have been.

P/L: $84.42
Wins: 7 46.67%
Losses: 8 53.33%
Break Even: 5 40.00%
Wins + BE: 12 60.00%
Trades: 20

Break even trades mean the stock went up at least 15c over the entry and it moved the stop to break even.

10/12/2018
These two trades below were made Friday at almost the exact same time and both worked perfectly with it almost catching the exact top both times. Before this day it made a couple mistakes (stopped out due to a bug / trading a setup with terrible volume) but also had some nice gains. The winners were always bigger than the losers despite these issues.

Unfortunately, I was not recording when it made these trades so I can’t show them in real time.

$ATXI 5m/1m candles
$FNKO 5m/1m candles

Week 1 - 10/15/2018
Not a whole lot going on today besides $YGYI having some nice 1m flag setups. It traded $NBEV twice. One loss in the morning and one small gain around noon. Not a great start to the week but the risk/reward is always good. Let’s see what happens tomorrow!

$NBEV 5m/1m candles



10/16/2018
$NDLS was very choppy and slow. It got out break even when it spiked into $12.99 and came back down to the entry. No gain or loss on this one. I’m not planning to upload a video of it because the entire flag just went sideways forever until finally breaking over $13.00 after a strong dip.

I manually traded two different flags on $FFHL which was fun. There’s really not a lot going on this week so far. That just means it’ll take longer to get the 20 trades. It’s good because these are worst case scenario trades. Earnings season is coming up so there should be some good opportunities.

New TWS theme in the beta release! I dig it but they need to fix some of the chart bugs and add premarket/after hours shading.

$NDLS 5m/1m candles

Update: I actually see a perfect bull flag on $ALT but it was not traded because the volume on the next candle was higher. I added a separate algo that changes that check. It will now trade them both separately so it will not change the results of this “forward test”. I’ll start logging those tomorrow in a separate spreadsheet.

10/17/2018
Yet another boring day. It traded $QNST but was not getting filled so I moved the order up slightly. The stock ended up moving quite a lot but could not get over $14.95 so it sold for break even. If this was real money I would have sold into the first push to that level or dumped it when it made the lower high. This trade and yesterday’s trade could have been winners if I decided to get out before the stop was hit. Not bad I guess.

No video for this one again. It’s just too slow.

$QNST 5m/1m candles

A little later it took a decent flag setup on $HEAR. This stock always has big moves which is nice. Got a little push into $22 then it dumped hard. Algo exited for a $2 gain, but that was with only 25 shares. Not bad. Could have easily been a win if I were managing it.

$HEAR 5m/1m candles

Another slow stock. I’ve seen this exact setup work last week. Unfortunately, this one did not. I think if it managed to get over $3 it would have ran, but I guess there’s just not enough volume. Decent exit since it gave it lots of time and got out on a spike.

$OMED 5m/1m candles

I actually saw a lot of halts late day so small caps might be heating up again. Eventually there will be one where it makes a crazy gain. It has before and it will again. Just grinding for now.

10/18/2018
It traded $PYX early in the morning. I’m starting to wonder if this is even going to work now because all the traders are now watching Chinese stocks and ignoring everything else. It’s also not as volatile as it was last week. The setup is perfect but that doesn’t matter. I’ll probably increase the volume requirements in the scan after I get 20 wins/losses. Flags seems to be crappy this entire week so I may need even more than 20 to determine an accurate win/loss ratio. Last week was amazing.

$PYX 5m/1m candles

A few minutes later $ACRS. Decent setup but got stopped out for break even. A little squeeze up to $11.84 which I could have sold into so technically a win if I managed it.

$ACRS 5m/1m candles

10/19/2018
This whole week has been rather boring.

It traded $VTVT and got a nice move over $4.00 pretty quickly. However, it was yet another break even trade. I think because small caps are kind of weak (besides the China sector) it’s only able to get 15-20c out of it and dumps quicker so there’s never an exit indicator. Basically what I’d have to do is change the profit target to like +30c / 3% instead of what I have now. That would make all of these break even trades winners. I’ll have to either change it when the markets slow or manage it myself.

It traded it again on the next flag but barely got a move out of it this time. I probably would have sold it right away for a $1 gain or something.

$VTVT 5m/1m candles

Winning percentage is actually decent (72%) if the targets are lower which means there’s usually a move right after it enters. It’s just getting stopped out when it comes back down because the moves they make are generally too weak. I wrote extra code that can be manually toggled for when the market is slow and it’ll have lower targets + move the stop above break even so it will more likely have some gain. I will not have that enabled until I get 20 trades.

Let’s see what happens next week.

Week 2 - 10/22/2018
No trades. I wasn’t here so I don’t really know how the day looked, but it seems like the shipping stocks were hot today.

10/23/2018
I was not here again. However, it managed to nail $PTI for a big win like I said it would eventually. Always feels nice to get a big win out of a trade while you’re sleeping.

$PTI 5m/1m candles

Decent setup on this one but ultimately failed. Plenty of time to get out for a small win if I managed it.

$CASI 5m/1m candles

Small pop that I could have sold into. Still seems like small caps are a bit weak. Break even trade.

Traded it again a few candles later just like $VTVT last week. It chopped around for a long time until the algo moved the stop. Got out for a small win which wiped out the previous loss (which would have been a win if I managed it). I’m not quite sure how this didn’t get stopped out despite hitting the stop loss exactly. Maybe it needs to tick below and since previous candles technically went below it so maybe those trades came in late and it never triggered, or maybe at IB it needs a full “tick” below so it needs to hit 1c lower (stop at 3.01, must touch <= 3.00).

$IGC 5m/1m candles

Only 4 more trades and I’ll have 20.

10/24/2018
No trades. I wasn’t able to start it until 10:30 so it’s possible it may have taken a trade earlier but we’ll never know.

10/25/2018
No trades. At this rate it’s going to take another week.

10/26/2018
I really didn’t expect this trade considering the entire market was being really whippy. Hit the target perfectly but for some reason the algo kept moving the stop to break even. I think it’s a rounding bug but that doesn’t matter. 3 more!

$YECO 5m/1m candles

Week 3 - 10/29/2018
No trades.

10/30/2018
$VCYT was part of another bull flag algo I modified to trade flags that have a little more volume on the pull back. Spreads were awful so no fill. It did get a decent 20c move so it could have been a win. This will not be counted since it’s a slightly different pattern.

$VCYT 5m/1m candles (no trade)

Couple minutes later it bought $DRYS which is part of the garbage shipping stocks that rarely make moves nowadays. I will probably make it ignore these simply because they never go anywhere but down. I’ll still count this one. I just hate this market right now.

$DRYS 5m/1m candles

10/31/2018
Last day of October. I’m hoping next month picks up because this one has been awful.

My separate volume algo tried to buy $DBD but no fill due to crappy spreads. Really nice setup and it would have hit the target too.

No other trades. My volume algo seems to be doing OK if it could get filled.

DBD 5m/1m candles (no trade)

11/1/2018
It would trade another shipping stock wouldn’t it. This time $GLBS which is just as bad as $DRYS from earlier. They are permanent shorts for me. Got a decent move from the entry of $10.17 to $10.50. No idea if there was enough time to even exit for a profit. Spreads were horrible.

Later it actually managed to hit the target. Impossible to trade.

$GLBS 5m/1m candles

About 10 minutes later, $SPAR. IB changed the stop orders slightly so it did not get out exactly where it wanted to. There’s a new flag you have to set called OpenClose and it needs to be set to C. It would have been a loss no matter what so that doesn’t matter.

$SPAR 5m/1m candles

20 Trades Later

I finally have 20 trades and the data does not look good for this strategy. The week I wrote this post about testing bull flags the entire market started dropping and got really weak. There were several days where it made no trades at all. The market does appear to be getting a little stronger. I can tell from the number of trades and stocks gapping up in premarket today.



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.

Clean Windows Caches

I wrote a simple PowerShell script that will delete all files/folders inside the temporary file paths. It will also clear the shader cache for AMD GPUs. I set this up to run on every reboot.

1
2
$folders = @("C:\Windows\Temp\*", "C:\Windows\Prefetch\*", "C:\Documents and Settings\*\Local Settings\temp\*", "C:\Users\*\AppData\Local\Temp\*", "C:\Users\*\Appdata\Local\Microsoft\Windows\Temporary Internet Files\*", "C:\Users\*\AppData\Local\AMD\DxCache\*", "C:\Users\*\AppData\Local\AMD\GLCache\*")
Remove-Item $folders -force -recurse -ErrorAction SilentlyContinue

YouTube Channel

I’ve decided to create a YouTube channel and have started uploading my trades to document my progress/algos progress. There are already tons of people posting daily recaps, but how many are posting live algorithmic trades? Certainly not what I’m attempting to achieve: scanning stocks in real-time then trading patterns when they show up. I looked through YouTube and could not find anything like this. It’s always forex/futures/specific stocks ($AAPL / $TWTR). I prefer to do what I’m doing simply because the patterns I look for should appear a few times each day on different stocks; which means there’s more opportunity to test and/or profit.

As far as I know there is not any backtesting software that allows you to backtest intraday candles and ticks based on the hot stocks appearing in a scan for the day. Obviously you can do it for individual stocks you select, but not for real-time scanning based on a set criteria. The software I wrote is totally custom for IB/TWS.

For now it’s all simulated trades until I’m confident in my strategy (manual and algo). Let’s see where this goes.

Check out my about page for other social media stuff.



Trading Update - 2
Trading Update - 1



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 - 2

I found an interesting bug that caused my algorithms to only trade from one IB scan that I had listed. I discovered it because it did not trade a perfect flag setup on $SYN a few days ago despite it being in most of the scans.

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
Starting backtest on $SYN...
Retrieving intraday candles/ticks...
Retrieving daily candles...
Backtesting 09/28/2018...
[09/28/2018 10:10:00] Entry 50 @ $4.15, target $4.57, stop $3.88 [ Bull Flag ]
Trailing stop: 3.88, 4.01, 4.15
[09/28/2018 10:15:00] Exit @ $4.59 [ $0.44 ]
Drawdown: $0.33 / -7.85%
Max profit: $0.52 / 12.66%
P/L: $21.89
[09/28/2018 11:00:00] Entry 25 @ $6.65, target $7.32, stop $6.06 [ Bull Flag ]
Trailing stop: 6.06, 6.65, 7.01
[09/28/2018 11:10:00] Exit @ $7.33 [ $0.68 ]
Drawdown: $0.32 / -4.94%
Max profit: $1.26 / 19.44%
P/L: $17.00
Gross P/L: $38.89 / $0.00
Commissions: $-4.00
Net P/L: $34.89
Win/Loss: 2 / 0 (100.00% / ∞)
Trades: 2 (2 long, 0 short)
Avg $ win/loss: $19.44 / $0.00
Best/Worst: $21.89 [ Bull Flag ] / $0.00 [ ]

After fixing it on Friday I figured on Monday it would do one of the following:

  1. Still take the same amount of trades because the ideal perfect setup is not occurring that frequently.
  2. Take more trades but probably all terrible.
  3. More trades but all great because the pattern is well known.

#2 is exactly what happened. The pattern is still good (I’ve seen it work many times) but because there’s a lack of volume and/or trades occurring, the stock does not move up and has a higher probability of working as a short.

As you can tell from the entries/exits from below, the trades didn’t exactly work. Both setups do look pretty good so it is trading the right pattern, and the second one actually worked. It didn’t hit the target so it stopped out near break even. The problem is if you look at the 1 minute chart it’s extremely illiquid with gaps and barely any volume on each 1m candle.

$NTGN 5 minute candles

$NTGN 1 minute candles (illiquid)

I believe this stock came from the TOP_PERC_GAIN / TOP_OPEN_PERC_GAIN scans. These are good basic scans but they don’t tell you anything useful except that the stock is up on the day. IB allows you to see the volume and trades for each candle but I have yet to find a good indicator to determine how “hot” or volatile a stock is.

I could look at the volume of each candle or trades per candle or even relative volume. It’s not that meaningful though since what happens when the pattern occurs perfectly before the volume conditions are met then it takes the trade at a later time and it ends up with a loss. I’ve had this happen with relative volume > 1 checks. Volume pours in immediately after the pattern sets up and you get in too late and buy high or short low.

There are other scans like TOP_TRADE_RATE / TOP_TRADE_COUNT / MOST_ACTIVE that return the stocks with the most volume/trades/trade rate so I will be testing those to see what it trades. I have a decent algo for trading flags now, so it just needs to be applied to the correct stocks.

Fall has just started, which is a great time to be trading with real money, so I’d really like to get this working. I could set the API to read-only and see what it wants to trade that way, but it’s just not the same and you don’t get a complete picture of what it’s doing with fills/moving stops/random bugs.


Scans

I went through a few of the different scans and landed on HOT_BY_VOLUME and TOP_TRADE_COUNT. The latter is what it originally traded with when it had the bug I described earlier. Both of these scans seem to return similar stocks so it should cover all the bases (lots of volume / lots of trades). After changing this, it traded $CRBP at 11:57 AM while I wasn’t even here.

$CRBP 5m/1m candles

It should have gotten in on the previous candle but it was not up enough on the day to warrant a flag. Still making minor adjustments.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Starting backtest on $CRBP...
Retrieving intraday candles/ticks...
Retrieving daily candles...
Backtesting 10/02/2018...
[10/02/2018 11:50:00] Entry 50 @ $7.47, target $8.22, stop $7.28 [ Bull Flag ]
Trailing stop: 7.28, 7.47, 8.01
[10/02/2018 12:00:00] Exit @ $8.23 [ $0.76 ]
Drawdown: $0.17 / -2.25%
Max profit: $0.68 / 8.99%
P/L: $38.00
Gross P/L: $38.00 / $0.00
Commissions: $-2.00
Net P/L: $36.00
Win/Loss: 1 / 0 (100.00% / ∞)
Trades: 1 (1 long, 0 short)
Avg $ win/loss: $38.00 / $0.00
Best/Worst: $38.00 [ Bull Flag ] / $0.00 [ ]

$VTVT

I recorded a lengthy video of me trading $VTVT manually on a 1m setup then a perfect 5m bull flag formed and my algo took it a few seconds after me. I’ll try to post more of these if I get something interesting.






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.

EZ Arch Encrypted Installation

  1. Download the Arch ISO.

  2. Find your disk.
    fdisk -l

  3. Partition (zero out the drive first using dd / secure erase if you want to).

    • fdisk /dev/nvme1n1
    • n
    • 1
    • enter
    • +550M
    • n
    • 2
    • enter
    • enter
    • t
    • 1
    • 1
    • w
  4. Encrypt. aes-xts should be the fastest if your CPU supports AES instructions. Most modern CPUs do. Also, Grub does not support LUKS2 yet so do not bother trying it.

    • cryptsetup benchmark
    • cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-urandom luksFormat /dev/nvme1n1p2
    • cryptsetup luksOpen /dev/nvme1n1p2 rootfs
  5. Format.

    • mkfs.vfat -F32 /dev/nvme1n1p1
    • mkfs.ext4 /dev/mapper/rootfs
  6. Mount.

    • mount /dev/mapper/rootfs /mnt
    • mkdir /mnt/boot
    • mount /dev/nvme1n1p1 /mnt/boot
  7. Install.

    • pacstrap /mnt base base-devel
    • genfstab -U /mnt > /mnt/etc/fstab
    • arch-chroot /mnt bash
  8. Grub.

    • pacman -S grub efibootmgr
    • Edit /etc/mkinitcpio.conf and add encrypt to the HOOKS field
    • mkinitcpio -p linux
    • Edit /etc/default/grub and uncomment GRUB_ENABLE_CRYPTODISK
    • Change GRUB_CMDLINE_LINUX to GRUB_CMDLINE_LINUX="cryptdevice=UUID=<uuid>:rootfs"
    • Replace the UUID above with the encrypted partition UUID from blkid
    • grub-install --target=x86_64-efi --bootloader-id=arch --efi-directory=/boot --recheck
    • grub-mkconfig -o /boot/grub/grub.cfg
  9. Swap. If you have tons of RAM this isn’t really necessary. Having a swap file instead of a partition makes things easier in case you need to remove the swap device or increase/decrease its size. It will also be encrypted since it’s located inside the LUKS partition.

    • dd if=/dev/zero of=/swap bs=1M count=2k
    • chmod 0600 /swap
    • mkswap /swap
    • swapon /swap
    • Edit /etc/fstab and add /swap none swap defaults 0 0
  10. Time zone.

    • ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
  11. Locale.

    • Edit /etc/locale.gen and uncomment your locale. Probably en_US.UTF-8.
    • locale-gen
    • Edit /etc/locale.conf and add LANG=en_US.UTF-8
  12. Hostname.

    • Edit /etc/hostname and set it to what the machine should be called.
  13. User.

    • useradd -m -g users -G wheel,storage,network,power,rfkill -s /bin/bash <username>
    • passwd <username>
    • passwd root
    • Edit /etc/sudoers and uncomment %wheel ALL=(ALL) ALL
  14. Reboot.

    • exit
    • reboot
  15. If you did everything correctly, you should see a Grub OS selection that will take you to a prompt to enter your password.

  16. I’ll be installing GNOME, but you can choose anything you like.

    • sudo systemctl start dhcpcd.service
    • sudo pacman -S xorg xorg-server gnome gnome-extra
    • sudo systemctl enable NetworkManager.service
    • sudo systemctl enable gdm.service
    • reboot

That’s pretty much it. Check out my short guide about improving desktop responsiveness.

Pot Stocks In 2018

When the cannabis sector heats up you can reference this list for potential trades. If you know of any more, leave a comment and I’ll add it.

Listed

OTC

  • $ACBFF
  • $HEMP
  • $KSHB
  • $POTN
  • $MJNA
  • $GRNH
  • $CANN
  • $EMHTF
  • $NUGS
  • $BUDZ



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.