Hi, I have custom indicator but I realized that 'index' was using in calculation section, and I cant directly use it in the onbar() section, or I have been wrong since the beginning by putting calculation part into onbar() section ? could anyone please help or giving me suggestion how should I slot in my custom indicator and logic into Cbot?