13E21 is a strategy based on the concept of "Buy-on-Dip" and "Sell-on-Rise". The strategy is built around the concept that as the market starts trending in a particular direction it will give a retrace to it's 13 exponential moving average price and then continue in it's trend thus forming higher lows (or lower highs) in the process.
The indicator 13E21 helps determine the 2 EMAs (13 and 21) and also highlights the candle that touches either EMAs and closes accordingly.
The edge in the code is that it makes use of the difference between the two EMAs as a signal of the market trending. It will trigger an entry only when the difference between the two EMAs is greater than 0.02% thus implying that the market is actually trending and not consolidating.
The indicator will give bullish triggers only when the price touches 13EMA or 21EMA, the closing price is greater than 13EMA and the difference between 13EMA and 21EMA is greater than 0.02% or 10 points.
Similarly, the indicator will give bearish triggers only when the price touches 13EMA or 21EMA, the closing price is less than 13EMA and the difference between 13EMA and 21EMA is greater than 0.02% or 10 points.