Hi,
When you have a computationally intensive indicator/signal loaded on a chart and then recompile the indicator/signal code MC would hang up (keep verifying the indicator/signal forever) and the memory would never get released.
The problem can be reproduced by the following code on MC version 3.0.1200.4785:
vars:
count( 0 );
for count = 1 to 10000
begin
TL_New(Date, time, high, date, time, low );
end;
Just load it to a chart with many bars. I loaded it on a chart with TS symbol @ER2.D 5min chart from 5/1/2007 to 6/11/2008. After the indicator is loaded on the chart recompile the PL code above. You will see this error on the output window:
------ Compiled with error(s): ------
The study or related functions in use. Please remove the study from the chart first
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
The study or related functions in use. Please remove the study from the chart first
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
The status of the indicator will be "verifying" forever and more important the memory will never get released.
Bug report - Compiling PL hangs up MC
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Re: Bug report - Compiling PL hangs up MC
The problem is that your code creates 1000 drawings on each bar.Hi,
When you have a computationally intensive indicator/signal loaded on a chart and then recompile the indicator/signal code MC would hang up (keep verifying the indicator/signal forever) and the memory would never get released.
The problem can be reproduced by the following code on MC version 3.0.1200.4785:
vars:
count( 0 );
for count = 1 to 10000
begin
TL_New(Date, time, high, date, time, low );
end;
Just load it to a chart with many bars. I loaded it on a chart with TS symbol @ER2.D 5min chart from 5/1/2007 to 6/11/2008. After the indicator is loaded on the chart recompile the PL code above. You will see this error on the output window:
------ Compiled with error(s): ------
The study or related functions in use. Please remove the study from the chart first
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
The study or related functions in use. Please remove the study from the chart first
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
The status of the indicator will be "verifying" forever and more important the memory will never get released.