When trading, one of the biggest question me and you will ever want to answer is knowing when to sell or when to buy. Just never forget, buy cheap and sell expensive; but the real question is when. If a pair is having a bullying trend, should I sell right away or wait because I may lose some potential earnings; on the other hand, if the pair is having a bearing trend, should I buy right away, or should I wait a little longer? Let's say trading is the art of predicting the future by knowing the past.
Thank god, trading experts have given us metrics and one of them is EMA. I will show you some very basic use of EMA to help you decide when to buy or sell.
The RSI is a momentum metric that helps to determine when it is a good moment to sell or buy. It's valued with nondimensional units between 0 and 100. The basic formula to calculate it is given by:
RSI(t) = 100 - 100 / (1 + RS(t))
RS(t) = Average gain of up periods during the specified t time frame / Average loss of down periods during the specified t time frame
The interesting thing on this metric is that it will work regardless the range of the variation. Thanks to this metric, you can see the likelihood of a given price. But, you can use it to know when to trade. Usually, when RSI returns a value higher than 70 it means it is a good moment to sell and lower than 30 it would be a good moment to buy.
With a little more of statistics, this metric could be used determine if a currency is a candidate for trading. For example, if a pair of a given time period hits many times the low and high thresholds, it could indicate the currency has enough fluctuations for trading. Of course, more conditions must meet.
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.