The STP Support/Resistance
Levels accurately detect the key levels by identifying large swings/pivots in historical price action automatically. It identifies price levels where historically the price reacted by either bouncing or reversing the direction. Prior price behavior at these levels can leave clues for future price behavior. These tops and bottoms in price action show where lots of buyers or sellers came into the market and might act as future levels of support or resistance. By default, the code detects the last 3 significant swing highs and the last 3 swing lows. When price action breaks above the resistance line the color changes to green because it's now support. Likewise, when the price action breaks below the support line the color changes to red because it's now resistance.