Monday, June 28, 2010

MySum

Why would I rewrite in indicator as simple as Sum? Because my indicators are designed to be used as components, and 'Sum' is needed in others I'm writing. The storage overhead of Ninjatrader's Sum is at least 2 kilobytes. The storage overhead for JHL.Utility.Sum of n periods is n * 8 + 16 bytes.

MySum.zip

Wednesday, June 23, 2010

My_VMA_ATR_React_V1

Strategy:

Channel: Upper edge is VMA of High plus ATR * multiple. Lower edge is VMA of Low minus ATR * multiple.

Sell if high of prior bar was above the upper edge and high of current bar is below the upper edge. Use high of prior bar as the initial stop.
Exit using VMA of Close as a trailing stop after the first close below the VMA.

Buy if low of prior bar was below the lower edge and low of current bar is above the lower edge.
Exit using VMA of Close as a trailing stop after the first close above the VMA.

My_VMA_ATR_Breakout_V2

This was an attempt to improve the V1 strategy using an exit criteria. This uses a stop based on +/- a mulitple of ATR from the high or low.

Is it an improvement? Hard to tell... net profit decreased(with different optimal parameters), but the SQN is higher though exit efficiency is worse; between them I think I'd still trade V1.

SQN 2.52
Net $5,106
Draw $998
Max loser $496
Efficiency:
Entry 63%
Exit 44%
Settings:
ATRPercent 190
ATRPeriod 6
CMOPeriod 9
VMAPeriod 5
ExitATRPercent 340
ExitATRPeriod 10

My_VMA_ATR_Breakout_V2

Monday, June 21, 2010

My_VMA_ATR_Breakout_V1

This strategy buys or sells on a price breakout from the VMA +- a multiple of ATR.

Optimized on ES-1006 the best performance acheived is:
SQN 2.36
Net $6,162
Draw $1,103
Max loser $796

Settings were:
ATRPercent 200
ATRPeriod 8
CMOPeriod 12
VMAPeriod 5

Entry efficiency was approximately 60%, and exit efficiency was 52%. This is a stop and reverse strategy, which should benefit greatly from finding a better exit strategy.

This strategy only trades during the regular session, but should be used with extended session data for the indicator calculations.

My_VMA_ATR_Breakout_V1

Sunday, June 13, 2010

Volume Weighted Moving Average

The VWMA (Volume-Weighted Moving Average) returns the volume-weighted moving average for the specified price series and period. VWMA is similar to a Simple Moving Average (SMA), but each bar of data is weighted by the bar's Volume. VWMA places more significance on the days with the largest volume and the least for the days with lowest volume for the period specified.

MyVWMA.zip

Variable Exponential Moving Average

The exponential period is modified by the value of the CMO indicator.

MyVMA.zip

Chande Momentum Oscillator

Updated 06/19/2010 to reflect refactoring of JHL.Utility from monolithic source file.

MyCMO.zip

Friday, June 11, 2010

Recent Highs & Lows

The attached indicators were created primarily to test the helper functions they use. I've been trying to understand and reimplement efficiently someone elses ADXVMA indicator. I noticed one thing it does is walk back n bars in a data series to get the high and the low for the period, and it does this on every bar.
The functions used here only have to walk previous bars when the extreme bar rolls off the back end.

MyLow.zip
MyHigh.zip

Tuesday, June 8, 2010

Welles Wilder's Summation Based Average

A moving average based on the Welles Wilder Summation divided by n periods. For any n, this is equivalent to the exponential moving average for 2 * n - 1 periods.

MyWellesAvg.zip

Welles Wilder's Summation

This probably isn't very useful by itself, but may be as the basis for other indicators.

MyWellesSum.zip

Tuesday, May 11, 2010

Delete All Snapshots For a Filesystem

zfs list -H -r -d 1 -t snapshot -o name tank/backup/machine|xargs -L 1 zfs destroy

Monday, May 3, 2010

Make 'root' a normal user

rolemod -K type=normal root

Friday, April 30, 2010

Wednesday, April 28, 2010

Installing Paravirtual DomU

virt-install --paravirt --name test --ram 2048 --noautoconsole --wait=-1 --os-type=solaris --os-variant=opensolaris --disk path=/var/local/lib/xen/images/test,sparse=true,device=disk,size=12 --location /var/local/iso/textinstall-134-x86.iso --network bridge=stub0
virsh console test (inform the installer the terminal type is xterm)

Tuesday, April 27, 2010

Setting VNC Server Geometry

inetadm -m svc:/application/x11/xvnc-inetd:default exec="/usr/bin/Xvnc -inetd -query localhost -once securitytypes=none -geometry 1680x1050x24"

Host-only networking

dhcpconfig -D -r SUNWfiles -p /var/local/dhcp -a 192.168.56.1 -d host.lan -h files -l 86400
dhcpconfig -N 192.168.56.0 -m 255.255.255.0 -t 192.168.56.1

Monday, April 26, 2010

Saturday, April 24, 2010

OpenSolaris Networking nVidia MCP67 Solved

My NIC identifies as an nVidia MCP67. The installer doesn't find a driver for it. The solution seams to be as follows...
After installation, boot to single-user mode. In grub edit:
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=graphics
change to:
kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS -s

Log in as root and run:
update_drv -a -i "pci10de,54c" nge
ifconfig nge0 plumb

The above gets the driver to load, but it has a strange incompitibility. On my system typing:
ifconfig nge0 ether
returns output including:
ether 11:6f:a0:1b:30:0
which is exactly backwards.

To bring the interface up I need to fix the mac address:
ifconfig nge0 ether 0:30:1b:a0:6f:11

To make this correction persistent put:
ether 0:30:1b:a0:6f:11
in /etc/hostname.nge0

Using USB to copy between Windows and Solaris, not

While OpenSolaris build 134 will automount a FAT32 usb drive, it can't seem to read it reliably. While trying to get the 'nfo' network driver installed the downloaded file had crc errors by the time I got it to the Solaris machine (which it does not have when downloaded directly on Solaris).

The windows GUI for formatting flash drives makes no reference to UDFS and defaults to Fat32. It turns out, you can format it properly from the command line:
format g: /fs:UDF

So, I expected that to be the answer, but then I couldn't manage to mount it on the Solaris side.

OpenSolaris Installation Bug

I'm leaving this for breadcrumbs... scratch this though. More to follow.

This has frustrated me for hours, largely because I changed all the wrong suspects before finding the real suspect. It was my first installation from USB media, so I thought that might be bad. It was my fist installation to a new SD so that was suspect. My disk controller (driver) was suspect. I have my home server sitting on the kitchen counter to install OpenSolaris. I didn't have a network cable strung to it, that was going in when it returned to its proper home. Installing OpenSolaris without a network attached fails! The symptom is errors trying to sign in after installation:

Could not update ICEauthority file /home/usrname/.ICEauthority
/usr/lib/gconf-sanity-check-2 exited with status 256

Attaching a cable after installation doesn't resolve it, apparently it needs to be networked at installation time (there are other post-installation workarounds):
http://bugs.opensolaris.org/view_bug.do?bug_id=6913780

And all of the above about need a cable attached might be completely bogus too. I'm not going to take still more time right now to find out. It turned out the installation cd also has no driver for my NIC. Here's hoping this one works for the long term:
http://homepage2.nifty.com/mrym3/taiyodo/nfo-2.6.3.tar.gz

Tuesday, April 20, 2010

OpenSolaris Notes

Partitioning:
fdisk /dev/rdsk/<diskid>p0 (e.g. fdisk /dev/rdsk/c3t0d0p0)

Enabling Deduplication:
zfs set dedup=on rpool

Prevent swap from completely eating my small root pool:
swap -d /dev/zvol/dsk/rpool/swap
zfs destroy rpool/swap
zfs create -s -b 4K -V 1G rpool/swap
swap -a /dev/zvol/dsk/rpool/swap

Convert text installation to GUI:
beadm create GUI
beadm mount GUI /mnt
pkg -R /mnt install babel_install
pkg -R /mnt uninstall babel_install slim_install
bootadm update-archive -R /mnt
beadm umount GUI
beadm activate GUI

Installing COMSTAR iscsi target:
pkg install storage/stmf
pkg install network/iscsi/target

Enabling xdmcp
Edit /etc/gdm/custom.conf, adding "Enable=true" under [xdmcp] section
svccfg -s svc:/application/x11/x11-server setprop options/tcp_listen=true
svcadm restart gdm

Enabling mega_sas for AOS-SASLP-H8iR:
pkg install driver/storage/mega_sas
rem_drv mega_sas
add_drv -i "pci15d9,c480" mega_sas