I need to ensure a user cannot set the Calculate to OnBarClose. I read something to the effect that it is bad to code this anywhere else except in the State.SetDefaults. What I read is something about checking what Calculate is set to, and if it is set to OnBarClose, then trigger a Log alert, and terminating the indicator. I found how to do the alert, but have not been able to find how to terminate the indicator.
This is what I have so far--
if(Calculate == Calculate.OnBarClose) { Log("Calculate may NOT be set to OnBarClose",LogLevel.Alert); //terminate indicator code goes here }
Comment