After brainstorm pseudocode, most challenging step to convert discretionary trading into program is pattern recognition.
How? Data-sampling?
AUTOCHANNEL
if price > MA then R = MA + f * ATR; S = MA
else if price < MA then S = MA - f * ATR; R = MA
else S = MA - 0.5f * ATR; R = MA + 0.5f * ATR
MACDS/MMAS
minoruptrend = gradient(fastmacd) > 0 AND fastmacd > 0
majoruptrend = gradient(slowmacd) > 0 AND slowmacd > 0
tradableuptrend = minoruptrend AND majoruptrend
divergence = sustained(current > previous(fastma - slowma))
convergence = sustained(current < previous(fastma - slowma))
BOLLINGER BANDS
rangeexpansion = sustained(current > previous (height))
rangecontraction = sustained(current < previous (height))
ENTRIES & EXITS
buy = tradableuptrend AND divergence AND rangeexpansion
sell = fastmacd < 0 AND broken autochannel support
Updated Mar:
Its interesting to note that in R&D, most ideas that come up during brainstorm wont make it to end-product. What initially seem as great ideas may turn out to underperform seemingly simple ideas that appear along the way.
The simple idea that appeared in this project is "trend-following". It simply appeared through evolution of rigorous backtesting to select survival of the fittest. Another discovery is the robustness of "negation trailing stop" and the synergy it has with "price impulse".
Sunday, December 14, 2008
Saturday, December 13, 2008
2 Ways
Theres generally 2 ways to earn from price movements.
First way is trading along the major trend. By entering and aligning your position with the big tide, you can sit tight and earn huge profits easily. This is the recommended way. Catch is you need patience in sitting tight for the full move to play out.
Second way is when prices move too deviated from its mean, price usually snapback to its norm. Or market sideways and prices whipsaw. This kind is countertrend/hit-and-run. Discouraged. You can earn quick profits. Lesser. And more likely to lose.
First way is trading along the major trend. By entering and aligning your position with the big tide, you can sit tight and earn huge profits easily. This is the recommended way. Catch is you need patience in sitting tight for the full move to play out.
Second way is when prices move too deviated from its mean, price usually snapback to its norm. Or market sideways and prices whipsaw. This kind is countertrend/hit-and-run. Discouraged. You can earn quick profits. Lesser. And more likely to lose.
DJ Call
Someone ask me market how?
I say "market choppy, easy to lose $ whether play bear or bull. Best stay out until trend appears."
Note when I post theres pre-requisite conditions for entry. My stand still same. Now not time for big easy profits.
Updated 15th Dec:
No followthru breakout, no enter.
Updated May:
System long 1 week earlier at lower price, cut 1 month later.
I say "market choppy, easy to lose $ whether play bear or bull. Best stay out until trend appears."
Updated 15th Dec:
No followthru breakout, no enter.
Updated May:
System long 1 week earlier at lower price, cut 1 month later.
UJ Call
HSI Loss
My first planned trade that made a huge move against me. By sitting tight and averaging a losing position (please never attempt this), I reduce $2k loss to $500 loss.

THE LESSON:
Set a cutloss before entering trade and stick to it.
(this lesson will repeatedly appear in an amateur trader's life)
Updated May:
System still in short mode at that point.
Long signal appear 1 day before the rally.
THE LESSON:
Set a cutloss before entering trade and stick to it.
(this lesson will repeatedly appear in an amateur trader's life)
Updated May:
System still in short mode at that point.
Long signal appear 1 day before the rally.
Sunday, December 7, 2008
Zeroth
Was looking through charts spanning decades. I suggest:
ZEROTH LAW - rule of buy resistance & sell support
In bull market, buy on break resistance sell on break support
In bear market, short on break support cover on break resistance
In mixed market, research enjoy holidays and wait for next trend
APPLICATION
In bull market, buy on breaking longer term resistance, sell on breaking short term support. After breaking long term resistance, if price retrace to test resistance-turn-support and then take out the breakout high, you will see a huge markup. Vice versa for bear.
ADDITIONAL NOTES
The game of trading is largely based on risks/rewards. Given a technical picture, has one more to gain by being long or short? This gives crowd the impetus to continue or break trend. Of course, ever-changing fundamental conditions ultimately shape these setups of changing risks/rewards for bears and bulls.
ZEROTH LAW - rule of buy resistance & sell support
In bull market, buy on break resistance sell on break support
In bear market, short on break support cover on break resistance
In mixed market, research enjoy holidays and wait for next trend
APPLICATION
In bull market, buy on breaking longer term resistance, sell on breaking short term support. After breaking long term resistance, if price retrace to test resistance-turn-support and then take out the breakout high, you will see a huge markup. Vice versa for bear.
ADDITIONAL NOTES
The game of trading is largely based on risks/rewards. Given a technical picture, has one more to gain by being long or short? This gives crowd the impetus to continue or break trend. Of course, ever-changing fundamental conditions ultimately shape these setups of changing risks/rewards for bears and bulls.
Subscribe to:
Posts (Atom)