## 3 Fractal Analysis  
Fractal-based approaches have been gaining popularity in market analyses. This is due to the fact that fractal analysis (FA) allows for more precise modeling of stock market trends than technical analysis. The implementation of fractal analysis requires recognition of the fractal dimension. For this purpose, we used the so-called box-counting procedure [38]. The analyzed data chart was covered by \(N\) small elements (boxes) of size \(S\). If we change the scale and the size of elements from \(S_{1}\) to \(S_{2}\), the relationship between the number of elements \(N_{1}\) and \(N_{2}\) needed to cover the graph with objects of \(S_{1}\) and \(S_{2}\) size, respectively, is given as [42]:  
\[\frac{N_{2}}{N_{1}}=\left(\frac{S_{1}}{S_{2}}\right)^{D}, \tag{10}\]  
\[D=\frac{\log\left(\frac{N_{1}}{N_{2}}\right)}{\log\left(\frac{S_{1}}{S_{2}} \right)} \tag{11}\]where \(D\) denotes the fractal dimension.  
When measuring the fractal dimension of the share prices chart, the considered period of time \(2T\) should be divided into two equal intervals. For each time period, the chart of share prices is covered by \(N\) elements. The number \(N_{1T}\) of elements in the first time period \(T\) is equal to:  
\[N_{1T}(k)=\frac{H_{T}(k)-L_{T}(k)}{T}, \tag{12}\]  
where \(H_{T}(k)\) and \(L_{T}(k)\) are the highest and lowest share prices in the first time period \(T\).  
The number \(N_{2T}\) of elements in the second time period \(T\) is equal to:  
\[N_{2T}(k)=\frac{H_{2T}(k)-L_{2T}(k)}{T}, \tag{13}\]  
where \(H_{2T}(k)\) and \(L_{2T}(k)\) are the highest and the lowest share prices in the second time period from \(T\) to \(2T\).  
The number \(N_{0-2T}\) of elements in the whole considered time period \(2T\) is equal to:  
\[N_{0-2T}(k)=\frac{H_{0-2T}(k)-L_{0-2T}(k)}{2T}, \tag{14}\]  
where \(H_{0-2T}(k)\) and \(L_{0-2T}(k)\) are the highest and the lowest share prices over the whole time period \(2T\).  
The fractal dimension of the share price chart is given by the relationship [42]:  
\[D=\frac{\log\left(\frac{N_{1T}+N_{2T}}{N_{(0-2)T}}\right)}{\log\left(\frac{2T} {T}\right)}=\frac{\log(N_{1T}+N_{2T})-\log(N_{(0-2)T})}{\log(2)}. \tag{15}\]  
The fractal dimension is used to define the fractal moving average (FRAMA). This moving average is derived from the exponential moving average (Equation (2)) with \((1-a)\) coefficient, where \(a\) is given by [42]:  
\[a=\exp(-4.6(D-1)). \tag{16}\]  
In this paper, we extend the idea of using a fractal approach to predict share prices and propose new technical analysis indicators with FRAMA:  
1. The relative strength index with FRAMA (RSI_FRAMA)--this FA indicator is derived from the TA indicator RSI (Equation (4)) by replacing EMA with FRAMA. \[\text{RSI\_FRAMA}_{C}(k)=100-\left[\frac{100}{1+\frac{\text{FRAMA}_{N,U}(k)} {\text{FRAMA}_{N,D}(k)}}\right],\] (17) where \(U(k)\) and \(D(k)\) are, respectively, the average increase and the average decrease on the \(k\)-th day.
2. The moving average convergence/divergence with FRAMA (MACD_FRAMA)--this FA oscillator is based on MACD (Equation (6)) and SL (Equation (7)), as described in Section 3. \[\text{MACD\_FRAMA}_{C}(k)=\text{FRAMA}_{12,C}(k)-\text{FRAMA}_{26,C}(k),\] (18) \[\text{SL}_{F}(k)=\text{FRAMA}_{9,\text{MACD\_FRAMA}}(k),\] (19) where \(\text{SL}_{F}\) is the signal line with FRAMA.  
The Bollinger oscillator with FRAMA (BOS_FRAMA) is based on Bollinger bands. It is derived from the BOS given in Equation (9) by replacing SMA by FRAMA. This oscillator indicates when the market is overbought or oversold. \[\text{BOS\_FRAMA}_{C}(k)=\frac{C(k+N-1)-\text{FRAMA}_{N,C}(k)}{\text{SD}ev_{C}(k)},\] (20) where \(\text{SD}ev_{C}(k)\) denotes the standard deviation.