Error on calling 'OnBarUpdate' method for indicator 'IndicatorName' on bar 533: A generic error occurred in GDI+.
The indicator does what it is supposed to do immediately after adding it to a chart or after hitting the f5 reload but that's it. I have ToTime in the if statement but the indicator is ignoring the time. Is the error above a simple one and I just need to add some basic code to fix it or are there many possibilities that could be causing the error?
Here is a code snippet:
protected override void OnBarUpdate()
{
if(CurrentBar < 10) return;
if (
ToTime(Time[0]) >= ToTime(09, 30, 0)
&& ToTime(Time[0]) <= ToTime(09, 35, 0)
&& myBool == true)
{
Do Something Here
}

Comment