I am new to ThinkorSwim and ThinkScript but have been using TradingView for a while now. I have noticed an unusual occurrence in many tickers, especially SPY. Whenever 3 consecutive bars close at the exact same price, that price tends to become a support or resistance, regardless of how long ago the 3 consecutive bars occurred. It seems that the 1-2 hr, 30, and 15 min timeframes work the best. If anyone can help me with what seems like a simple code I would really appreciate it.
Here are some of the lines created with dates and the timeframe as to when the level was formed.
Here are some of the lines created with dates and the timeframe as to when the level was formed.