I have developed an indicator that draws rectangular drawing objects onto the chart.
I have set a parameter (Zone Charting Start Date) in the Indicator properties window to determine how far back in the historical data to look when calculating were these rectangular drawing objects are to be drawn from. The default is 5 days.
Sample Code:
if (DateTime.Compare(Time[0],ZoneChartingStartDateTime) < 0)
return;
There are a number of rules that determine if the rectangular drawing object will be drawn and these are all managed by a bespoke class object (PullBack) that I have set up. These class objects are created and updated on each OnBarUpdate event and multiple class objects are stored in a list (PullBacks) until such time as all the rules are validated or a rule is invalid.
Sample Code:
private List<PullBackClass> PullBacks;
If a rule becomes invalid then the class object is removed from the list
Sample Code:
If all rules are validated then the rectangular drawing object is drawn
Sample Code:
The indicator is meant to be used on Futures Instruments at small intervals (133 Tick).
The problem I am encountering is that for some unknown reason the rectangular drawing objects are not being drawn at this Tick interval (eg: 133) but will be drawn at high Tick intervals (eg: 150 Tick). However, this problem is not consistant as it works fine on some computers but does not work on other computers.
Could this problem be caused by there being too many drawing objects & class objects being created in the lower timeframes?
Do I need to do some sort of "house cleaning"?
Is this a computer resource issue (eg: memory)?
Other than these thoughts I do not know what could be causing this problem. Does anyone have any ideas on the root cause of this problem?

Comment