Indicators: Currency Strength Index (CSI) - page 2

 

In my opinion there is a flaw with this and many other Currency Strength indices, and that is that the data is not time aligned.

Each currency pair can have gaps (missing bars) due to inactivity during that bar's duration. It is not noticeable on higher time frames, but on lower time-frames it can be quite noticeable, especially on exotics and minor pairs which are traded less.

Given that this indicator uses the bar shift (and not a time index), there is no guarantee that for a specific bar shift, the timestamp of all the symbols are the same, causing the resulting strength calculation to mix data from different timestamps, especially at the lower time frames.

To fix this, the indicator would need to synchronise and align the timestamps of all the data from the various symbols, as the data is processed.

 
Inactivity of a currency is not a missing bar. It is a bar with its open, high, low and close are the same value. This will be represented like a "dash" on the chart of lower time frames.

So, for this inactive period of trading, the strength of this currency should be the same, and I think this is the correct behavior. 

Imagine a currency whose price is not moving for a long period of time, its moving average line should coincide with its price line.

In CSI, time shifts are applied on the standard moving average indicator, not on the price data itself.

I appreciate your comments and if you have a code sample to do it in another way please send it to me.
 
amrali #: Inactivity of a currency is not a missing bar. It is a bar with its open, high, low and close are the same value. This will be represented like a "dash" on the chart of lower time frames.

No, that is incorrect. When there is no tick activity, then no bar is formed. The bar will be missing. This I can guarantee.

Analyse some low activity symbols at low time-frames and you will find that happening.

A very simple example that illustrates this is weekends and special holidays.

amrali #: So, for this inactive period of trading, the strength of this currency should be the same, and I think this is the correct behavior. 

Imagine a currency whose price is not moving for a long period of time, its moving average line should coincide with its price line.

In CSI, time shifts are applied on the standard moving average indicator, not on the price data itself.

Even if the moving average does not change for the missing time, when calculating the Currency Strength, if you don't align things, then you are mixing apples and oranges.

 
Nice addition to algo trading arsenal