Tolerance limit to identify 'tag' to a S&R level

Hello Everyone,

Please share your thoughts about how can I define tolerance limit to identify if price tagged a support / resistance level. The actual price may not hit S&R but within a tolerance range.



Currently I am using 0.05% of SMA of Close price. This causes optimization error in back testing.



E.g. tolerance on current prices of Gold would be around $1.25 while with the same 0.05% limit tolerance in 2018 price have been $0.60.



Using ATR will also suffer from the same issue, as I understand.



If I do back test for 10 years, there will significantly more tags identified than say in 2023 or 2024.



Ideas to resolve this will be appreciated. Thanks in advance.

Hello Anil,



I believe if you are keeping a percentage (0.05% as mentioned) of the SMA of Close, the value will be in relation to that period's SMA and hence your tolerance value will keep changing as well.



Let me think out loud here. If you keep it as a percentage of SMA, or close values, you might get low "tags" or times where the price breaches this tolerance value in periods of low volatility but you will get more tags in periods of high volatility.



I guess that could be something which you could look into. The ATR formula is different than the SMA and so it shouldn't suffer from above issue. You can try other indicators which measure volatility so that you can dynamically change tolerance values.



Hope this helps.

Hi Rekhit



Thanks for your suggestion. Yeh I got some more suggestions about using ATR. I will try to implement it and see if I get improved results.



Basically I am trying to use this tolerance in Candle Pattern indicator, so backtest can help in judgeing the probability of success with % of ATR or % of CloseSMA.



The main concern of changes in absolute values of tolerance after few years (2018 v/s 2024), still remain mistry to solve.

Hi Anil,



I feel that if you are using tolerance values relative to the close in the case of SMA (or other variables if using ATR Indicator), then it should be fine not to focus on what the actual tolerance value is.



Whether it is $1.25 in comparison to the Gold price of 2024 or $0.6 in 2018. This is because the tolerance value is also changing in relation to the price, and so the price might not tag more or less in certain years. But again, only a backtest will confirm this.



But yes, do let us know if your backtest improved using ATR or stayed the same.



Hope this helps.