Risk warning

All articles, strategies and indicators are just reflecting a single traders opinion and should be viewed as that.
I advice everybody to trade with a DEMO account!

Thursday, January 27, 2011

A basic guide for writing a profitable CTL strategy.

A basic guide for writing a profitable CTL strategy.

Detection of the current market conditions.

Not all strategies are performing as well in a ranging market and in a trending market. If you are planning to write a strategy for a ranging market. Make sure you test that the market is ranging. If not you're strategy could start accumulating losses. But that is easier said than done. How can you know the market will be ranging and when will it be trending? First of all you could check when important data is going to be released. The release of important data is often a trigger for a trending market. It is possible to put the time of release as an input of your strategy. There are a lot of indicators that can help you decide if the market is ranging or not. Bollinger bands, moving averages, ADX, RSI, stochastics...they all show when the market is ranging or not.

Detection of the volatility and the best time to trade.

I find this one very easy. Volatility is very easy to check with the average true range. You could also check for the recent highs and lows. If the difference between those 2 is very small than you better wait for better moments. Everbody will agree that if a moving average is flat and the difference between the highs and lows is only a few pips that you better stay out and wait for better opportunities. There is 1 exception if you are using a breakout strategy you will probably wanna try to detect when the market is going out of that “useless” channel. But basically you are doing the same as somebody that has a strategy for a trending market. You got your buy and sell orders ready to kick in....

Profit target and stop loss.

You strategy should check what the expected profit target will be and the optimal stop loss for that profit target. I will explain with bollinger bands. Imagine you are using a “classic” bollinger band strategy. Then you will probably going long when you have a upcrossing of the lower band. So what will your profit target be? The upper bollinger band? So the profit target would be the difference between the upper bollinger band and the lower bollinger band. So if you want your strategy to have a strict money management you know what your stop level will be. In general traders often say you will need a 2:1 risk reward so the stop loss level would be half of the distance between the upper and lower band.

Check your balance with equity().

If you want your CTL strategy to behave like a real trader you could write a few lines to check if the risk it is taking doesn't exceed the maximum loss you are willing to take. Most traders don't wanna risk more than 2% of their balance (equity) on 1 trade.

Strategy doing his own small back test.

You will say: what the hell is he talking about I did my back test..With a small loop you could check what the performance of your strategy would have been if it was launched 200 candles earlier. If your strategy test and finds out that it would have lost big time...would you still launch that strategy?

Adaptive strategies.
You could make a small loop in your CTL code to optimize the indicators that you are using in your strategy. Again I will explain with a basic strategy. Imagine you are going long when you have an upcrossing of the moving average. Imagine you are using a moving average with period 20. You can easily write a loop in CTL that test what the result would have been with period 15 or period 25 in the x candles before...you could. Than maybe the CT strategy could optimize the period itself...

Use CTL code you understand.

Forget the search on the net for a strategy that will make you rich. Don't use any CTL strategy if you don't understand the code and know what it is doing. Would you put your CTL code on the net if it would be making consistent profits? Don't understand me wrong. If you looking up CTL code to use and adapt..to learn that is fine.

No comments:

Post a Comment