Custom Indicator Problem

 

I've written my first custom indicator, however it has one issue. It will only run the first time I apply it to my chart. It never updates/refreshes/re-runs itself after that.

Is there anything specific I could check that would cause that?

Thanks.

 
maybe error in your codes.  no code, no one knoe where it.
 
DxdCn:
maybe error in your codes. no code, no one knoe where it.

I was able to figure it out.  Thanks for your help though.
Reason: