OPEN-SOURCE SCRIPT

Deviation Rate From Dynamic MA

240
This indicator does the following; starting from the first bar (including the first bar) it calculates the average of the closings of the following bars, until the closing of a bar reaches the average. If the price has returned to the average, the starting bar for the average calculation is reset, that is, it starts calculating the average again from the bar where the return to the average (intersection) occurred.

If the deviation is greater than the entered percentage value (3% by default), it shows the deviation rate for each bar on the chart with a label. The color of the label text is shown as darker as the deviation rate increases, and more transparent as it decreases. You can change these settings according to your own preferences from the codes. You can create alarm conditions such as "If the deviation rate from the average is greater than x" to enter the transaction.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。