Archive for November, 2007|Monthly archive page
squeeze indicator
I just wrote a ’squeeze’ indicator for eSignal inspired by one of John Carter’s setups in “Mastering the Trade” (www.tradethemarkets.com sells it for $500 so this is my gift to you!). The screen shot below shows the indicator running against a 5′ chart of EUR/USD. The interpretation is simple:
- A contraction of the Bollinger Bands (BB) inside the Keltner Bands (KB) is shown by a white circle on the 0 axis of the indicator. Such contractions reflect a market taking a break and consolidating, and is usually seen as a potential leading indicator of subsequent directional movement. Therefore a series of white circles will warn the trader to stay on the lookout for a BB expansion outside the KB (shown by blue circles) which would be an entry signal. Keep in mind that the longer the contraction, the stronger the potential breakout.
- The entry should be made in the direction of the momentum (see histogram). A positive momentum supports a long position, while a negative momentum supports a short position. Note that I have built the histogram based on an fast EMA study (5 periods) of the momentum indicator. This smoothed the histogram and made the exit signal (see below) clearer.
- The exit should be made when momentum weakens. In long trades, strenghtening momentum is shown by lime bars (current bar is greater than former bar) while weakening momemtum is shown by green bars (current bar is lesser than former bar). In short trades, strength is shown by red bars, while weakness is shown by magenta bars. A typical move would be to exit the trade at the first sign of weakness in momentum (e.g. first green or magenta bar). Note that the trader could also pay attention to candlestick patterns as signs of reversals which would offset the lagging nature of the histogram.
Source Code: dl_squeezeefs.pdf

Risk anyone?
Does one need to be a ‘risk taker’ to be a trader? To answer this
question one has to first define risk taker, here is what the
dictionary has to offer ‘Someone who risks loss or injury in the hope
of gain or excitement’. Synomyms are ‘gambler’ and ‘adventurer’. Is
that what a trader should be?
My belief is that successful traders are anything but risk takers.
Here is how I would compare the two terms:
Successful Trader:
* is more focused on trading well and minimizing losses than seeking
the big wins
* envisions trading has a profession, and seeks to develop expertise
on an ongoing basis
* considers trading as a business and not as a hobby
* follows a rational decision making process when making investment
decisions
* understands that trading is a competition and approaches it as such
* understands that their own character/personality is a critical
element of their business success
* develops and continuously improves a trading plan that not only
includes entries/exits/setups for more importantly focuses on money
management, risk management, and position sizing.
Risk Taker:
* seeks only the BIG wins with little consideration for the potential
losses
* figures that they can just buy a tool and quickly become a
millionaire
* is only interested in the ‘results’ of trading, not in the ‘process
of becoming’ a trader
* believes that trading is for everyone
* makes impulsive purchase decisions of expensive tools without
verifying their claims
* has no understanding of proper risk management, money management, or
position sizing. The risk taker figures that spotting the “right”
entries is 90% of the battle.
Bottom line, in Warren Buffet’s own words “Risk comes from not knowing
what you’re doing”. In my view that’s what differentiates a risk
taker from a successful trader. This is not to say that a risk taker
cannot have successul trades, but I believe they will not be able to
do so CONSISTENTLY.
modified directional movement
I have been having a bit more fun with EFS. This EFS script is a basic modification of the direction movement (ADX) indicator. It displays a blue light symbol in the AFS study when:
- ADX >= 20
- ADX has been increasing in value of the last three period (trend strenghtening)
The code for this indicator is as follows: dl_dm.pdf
Here is a snapshot of the screen:

first backtesting experiment
My first backtesting experiment is based on a simplified version of the Perfect Order strategy explained earlier. Basically the rules are:
- For Entry:
- EMA Cross-over and Perfect Order
- ADX > 25 and rising
- For Exit:
- EMA(9) and EMA(18) cross-over
- Stops were not used
Note that in this case I have omitted the 5 bar close confirmation prior to entry, hence the simplification.
The code for this strategy is provided in this .pdf file: backtest.pdf
The screen capture below shows the visual representation of the strategy on the chart itself. Here you can clearly see the Sell and Buy Signal that are generated.
In terms of backtesting parameters I have assumed an account of $10,000 that would be trading mini-lots of 10K each, for $1/pip. The results were unfortunately not very promising for this simple strategy (see below).
Using a 15′ chart for trade management, we see a clear loss of equity over the backtesting period for the 39 trades that were executed:

Interestingly the results improve if we use a 30′ chart instead of a 15′ chart (see below):

At this point I don’t know if that means that the strategy is better suited to 30′ rather than 15′ charts or if the difference is a form of curve-fitting that appears to improve the return in THIS situation.
first custom strategy
Now that I have eSignal, I have started to code some custom strategies and indicators based on the recommendations that I have found in some books. This one is called the “Perfect Order” strategy and it was discussed in Kathy Lien’s “Day Trading the Currency Market”. It is based on the following rules:
- Look for a currency pair with moving averages in perfect order. In this case I am looking for a perfect order between EMA(9), EMA(18), and EMA(40).
- Look for ADX pointing upward, and ideally > 20. Point 1 and Point 2 make up my ’set-up’.
- Enter five candles after the initial formation of the perfect order (if it still holds). Here I will look for 5 candles post set-up that do not break the EMA(9).
- Exit the position when the perfect order no longer holds, i.e. EMA cross over.
It took some time to write this first strategy in eSignal but overall it wasn’t a difficult task. I provide the code in the .pdf attachment below as well as a screen print of the visualization.
Perfect Order Source Code —> perfectorder.pdf

my platform(s) of choice
Selecting a trading platform has not been an easy choice and my current selection is actually what I would call a ‘trial’ selection as I am not entirely committed to it yet. In any case, my requirements were as follows:
- I wanted a robust charting/analysis platform that was:
- extensible via custom programming of indicators and strategies
- at least applicable to Forex, Equities, and Futures so that I could reuse the software assets across different instruments (see above)
- capable of backtesting and paper trading
- broker independent
- I wanted a broker that:
- was not a deal desk/market maker, and therefore preferably an ECN/STP
- was at least ‘loosely’ integrated within the charting/analysis platform
After much thought and experimentation I ended up selecting eSignal and MB Trading. While the combination may not be ideal (I am already encountering stability issues and a less than ideal integration between the products), I will give this combo a chance and will try to experiment with it on the FX market.
Below you see what a single monitor set-up of what this combination looks like. The Charting and Quote Windows are eSignal dialogs. However the order entry, Open Positions, and Order Books are MB Trading dialogs that are available within eSignal through an MBT Navigator menu.

So far I have found the following limitations/issues:
- There is a discrepancy in terms of the bid/ask quotes between the FX data feed provided by eSignal and the data feed provided by MB Trading. These discrepancies are evident if you look at the MB Trading FX Board (also available within eSignal) and the eSignal chart or Quote Window.
- The MB Trading dialogs that are available within eSignal are not link-able to the eSignal dialogs. This creates a potential issues if, for instance, you are looking at a USD/JPY chart and want to execute an order against this pair while the MB Trading order entry window may still be set on a EUR/USD pair for instance. This can be confusing and error-prone.
- I have noticed some system instabilities between the two vendors, primarily in terms of MB Trading stability, often causing some server disconnects or even system crashes. While this may be due to my system set-up it points to potential integration issues between the two vendors.
- Neither of the two vendors really takes ownership of the integration which causes some headaches when trying to resolve an issue with their tech support.
I will continue to describe my experience with this combination in this blog. Eventually I will have to see if this solution is viable and sufficiently robust for trading the FX. Stay tuned.
Comments (6)
Leave a Comment
Leave a Comment