I can't say much without seeing a screenshot, but I see 2 potential problems in your code:
1. If you call that code in OnCalculate() function then you create an object each tick. Do you delete it each tick? It's better to create it only once and then only change the displayed value.
2. You have a variable containing current CCI value and the object with the same name - myCCInow. Ideally that shouldn't be a problem, but maybe it's the cause?
|