Sorry to keep bothering you, but I hit a small roadblock in implementing my strategy in KiteXL.
Is it at all possible to get an SMA into a cell from the Kite Connect API, maybe using VBA?
I have been trying a workaround by copying the LTP of a scrip to a new cell every 5 minutes and then calculating the average of the last n such recorded LTPs to get a moving average. However, this means I have to write a macro for each individual scrip, write another macro to call all the other macros and then maybe assign that to a button to start recording the data. Since I am trying to do this for all F&O stocks, it is taking forever
Request you to please suggest any other way also by which you think this may be possible.
Good, you finished your workaround.
But writing data to sheets, will be less efficient.
Instead, You can try using MS Scripting.Dictionary to store last 'n' period values and find average of that 'n' period.