The Semi-Cup Formation is a technical indicator whose purpose is predicting cup formations during their development. Spotting such formations at early phases can be a powerful method of trend reversal forecasting.

In order to find semi-cup formations, this study employs the following algorithm.

Semi-cup formation occurs in a sequence of bars, the first of which has the highest price of specified type compared to the others; this sequence can be defined by minimum and maximum length. The price of the first bar must be greater than that of the last bar multiplied by user-defined factor.

Once the sequence is found, the price data is converted into logarithmic scale by taking a natural logarithm of price of each bar. After conversion, directional index is calculated. The directional index is a simplified version of DMI using the logarithm instead of price itself and simple smoothing instead of Wilder's average.

The sequence is then divided into five equal parts. Analyzing these parts, the semi-cup formation is recognized if:

  • Logarithmic price values of the last two parts are in the lower 40% of the range between the highest and lowest logarithms;
  • Logarithmic price values of the middle part are in the lower 60% of this range;
  • The first two parts have the directional index greater than 25;
  • The last three parts have the directional index lower than 25.

Input Parameters

Parameter Description
price The price subjected to logarithmic scale conversion.
min length The minimum number of bars allowed in the sequence.
max length The maximum number of bars allowed in the sequence.
factor The factor by which the price of the first bar exceeds that of the last bar in the detected sequence.


Plot Description
SemiCup The dot marking the last bar in the sequence.
Curve The curve of the last semi-cup formation occurred.

Further Reading

1. "Identifying Cup Formations Early" by Giorgos E. Siligardos, PhD. Technical Analysis of Stocks & Commodities, April 2011.


*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.