The second release of the User Manual is out. The most important additions are the sections on how to set up Trading Systems. Bunch of other new sections as well.
It now stands at 177 pages, so don't be alarmed if there's a spelling mis-steak in there somewhere.
It's suddenly dawned on me that Christmas is just 2 weeks away.
I want to release v1.0 on Christmas Day.
I will now stop playing around with the historical data and backtesting, and get back to coding.
The Gain Capital data looks more messed up than I originally thought. Ticks like -0.0190, and 1965.0001 are obviously wrong and easy to spot. But for others it's a judgement call. News events cause spikes just like bad ticks do, and it's important not to delete news spikes from existence.
Anyway, it takes a while, and I'll have to get back to it after finishing the freaking software. I've decided to use only the data from 1st Jan 2004 onwards. This is where the Oanda data starts from as well, and I think it's far enough back.
p.s. Did I mention it's not so easy to find a profitable trading system?
Oh, one more thing. This whole software venture started when I couldn't get the trading system I had bought to work. I just kept losing money. So I decided to write some backtesting software to see if it was me or the rules that weren't working.
Going through the literature I was given, turns out there are about 60 variations on the trading system. I've punched in to my software only the 12 long-term ones, and preliminary testing has it that the rules suck.
But the trading system has a few catch-alls for any such problems. Firstly, you're not supposed to trade near support and resistance lines, and my software can't determine those. No trading in congestion, and my software can't determine that (anybody come up with a way to determine "congestion"?).
My favourite is "You need to get a feeling for the market, and learn when the rules will work, and when they won't."
Learn when the rules will work? Probably as simple as learning when the price is "obviously" going up.
The "Trading Systems For Free" page became "
Real-life Examples".
I've just added a new system to that page which I have not tested one little bit!
Here's what I wrote:
I haven't tested this system out at all, I just wanted to give an example using the Chandelier stop. As you will see, I'm about to mix my 5-Minute %b System #1 with a stop loss technique which is supposed to be used on Hourly bars. Therefore please backtest and modify before use! (Should go without saying).
I've heard of the Chandelier stop before somewhere, but I'm not sure where (if there's an originating source I should reference, please let me know). I came across it again in the
Oanda forums, specifically
this post.
Here's what a fella (?) called EZCurrency said:
For a trailing stop for a long, I use HHV(H,24)-3.5*ATR(24) on an hourly chart. This is the highest high value of the past 24 hrs, then subtract 3.5 times the average range of the past 24 hrs. This accounts for the volatility. Plot it and you will see it is an excellent trailing stop for most pairs!
Another person, Gouranga, then came up with a possible improvement:
One can combine this with a LLV(n) (eg. Long Trade) and take the higher trailer of the two. LLV(n) trailer locks in profit when market consolidates. While (HHV - ATR) locks in profit when market trends. So, you get the best of both mkt conditions.
The basic theory of using a number of ATRs in order to calculate the stop loss, is that it's adaptive to the current market conditions - during volatile periods the stop will be placed further away, and during less volatile periods the stop will be brought closer to the current price.
All Bollinger settings used a period of 720, with 2 standard deviations above and below. The period for the ATR is 24.
I'm not going to use the Highest High minus the ATRs. Instead, I'm just going to use the High of the current bar minus the ATRs.
| Rule Type | Description |
| Long - Entry Rules | Value of %b Is Below X (0.1) |
| Long - Entry Values | Price Where %b Would Equal X (0.1) |
| Long - Init. S/L Values | [OHLC] (using the High) Minus X (3.5) Average True Range(s) |
| Long S/L Mgmt Rules | Every Bar |
| Long S/L Mgmt Values | [OHLC] (using the High) Minus X (3.5) Average True Range(s) |
| Long S/L Mgmt Rules #2 | Every Bar |
| Long S/L Mgmt Values #2 | Low Of Previous X (24) Bars |
And for shorts:
| Rule Type | Description |
| Short - Entry Rules | Value of %b Is Above X (0.8) |
| Short - Entry Values | Price Where %b Would Equal X (0.8) |
| Short - Init. S/L Values | [OHLC] (using the Low) Plus X (3.5) Average True Range(s) |
| Short S/L Mgmt Rules | Every Bar |
| Short S/L Mgmt Values | [OHLC] (using the Low) Plus X (3.5) Average True Range(s) |
| Short S/L Mgmt Rules #2 | Every Bar |
| Short S/L Mgmt Values #2 | High Of Previous X (24) Bars |
Note that TS automatically works out which is, in the case of the Long trades, the higher of the two Long S/L Mgmt Values (and the lower of the two Short S/L Mgmt Values). Also note that stop losses never move to a position of increased risk.