One of the things I have learned when coding Trademinator is that you can not have the same strategy when you have a bulling or bearing market. When a market is bulling, the smartest thing you could do is holding until you reach an inflection point before selling; when you are in a bearing market, you sell to prevent losses as soon as possible.
There are many ways to detect the trend: bearish, neutral, bullish. The DMI and ADX metrics are for that, but they require CPU power. After giving a thought, I came with one solution from my own which it requires much less CPU. I will talk about one I have come myself.
The idea behind this technique is very simple. You compare two values from the ticker or functions from the ticker. The function is like the PHP or C strcmp function; it returns -1 if less, 0 if equal or 1 if greater. Run this function for the last N candlesticks. After that, a simple statistic work will let you know the trend. I use the SMA(20) in the closing candle or the EMA(20) in the closing as well. You can also change the last candlesticks to analyze, I use twenty as the Bollinger bars use it by default; no need to rediscover things.
For example, in the following image, visually speaking it is clearly a bullying trend. However, we need to do this analytically. The red line is the SMA(20, close) function.
If we run a statistic analysis, we will have:
Now, look the following graph. Visually speaking it is a neutral trend, it does not go up or down constantly.
After running the statistic analysis, we have:
Experience has shown me that if there is no trend with a majority of 75%, then it can be declared as neutral.
Check the last graphic. A clear bearing trend.
The statistic analysis shows us that:
Now that you know the trend without watching the candle graph, you can decide your strategies. For example, here there are some ideas:
Good luck!blog comments powered by Disqus
Read about IT, Migration, Business, Money, Marketing and other subjects.
Some subjects: FusionPBX, FreeSWITCH, Linux, Security, Canada, Cryptocurrency, Trading.