Hi Eugene,
I want to make a function which is measures the number of Cross up or down of any two dataseries in a certain period. For example, in the last 30 bars, SMA(5) crossed up SMA(30) three times. This function NumberOfCO(SMA(5), SMA(30), 30, up) returns 3. The other scenario could be counting the number of MACDEX crossed over MACD signal twice in the last 7 days. This function NumberOfCO(MACDEX(12,26,9), MACDSignal(12,26,9), 7, up) returns 2. Or, MACD cross up zero twice in the last 7 days. This function NumberOfCO(MACD(12, 26, 9), 0, 7, up) returns 2.
I worked on this function, but it is not great so far. Do you have any example for this kind of function?
Many thanks?
Size:
Color:
Size:
Color:
Thanks so much. Your help's never been late. :)
Size:
Color: