Hi Team, Greetings for the day, thanks a lot for the extensive support.
I wrote the VIDYA indicator formula in python (copied below), after compiling the code the indicator values are not matching with values on ChartIQ charts shown on the Kite UI. But it matches exactly with the Trading view source. Could you please help me in fixing my code.
I want to get the values that are displayed on Chart IQ.
Here is my method: def vidya(self, input_list, prev_vidya=None, period=5): vidya_list = [] if prev_vidya is None: prev_vidya = 0.0 multiplier = 2/(period+1) deltas = numpy.diff(input_list) for index in range(period-1, len(deltas)): diff = deltas[index-period+1:index+1] up_sum = round(diff[diff >= 0].sum(),self._indicator_precision) down_sum = round(abs(diff[diff < 0].sum()),self._indicator_precision) if up_sum == 0 and down_sum == 0: cmo = 0.0 else: cmo = abs((up_sum-down_sum)/(up_sum+down_sum)) prev_vidya = round(((input_list[index+1] * multiplier * cmo) + (prev_vidya * (1-(multiplier*cmo)))), self._indicator_precision) vidya_list.append(prev_vidya) return vidya_list
Also, please let me know the difference in VIDYA algorithm between ChartIQ & Tradingview
@mrsegu I just wanted to highlight my previous post on vidya here In your computation of vidya you have used CMO which is modified version of vidya by Tushar Chande. By using CMO your indicator is Variable adaptive moving average which is "Variable" moving average type in kite chart. In the original version of vidya Tushare chande has used "standard deviation" and "r" to compute vidya. I have used multiple simulations to match the values using sd and r with the values in ChartIQ, the closest match I could find is std(10)/std(50) to replace volatility (CMO). I am not sure whether team at Kite have the workings for it. Would love to work together to get the exact match. Looking forward to it.
In your computation of vidya you have used CMO which is modified version of vidya by Tushar Chande. By using CMO your indicator is Variable adaptive moving average which is "Variable" moving average type in kite chart. In the original version of vidya Tushare chande has used "standard deviation" and "r" to compute vidya. I have used multiple simulations to match the values using sd and r with the values in ChartIQ, the closest match I could find is std(10)/std(50) to replace volatility (CMO). I am not sure whether team at Kite have the workings for it. Would love to work together to get the exact match. Looking forward to it.