Aborting strategy calculation

Questions about MultiCharts and user contributed studies.
glam_100
Posts: 157
Joined: 14 Jun 2006
Has thanked: 2 times
Been thanked: 4 times

Aborting strategy calculation

Postby glam_100 » 14 May 2008

Is there a way to abort a running strategy (when it takes forever) like what we can do with TS? TS has a button on the upper left corner that we can click on to abort strategy. I don't seem to find anything similar with MC.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 15 May 2008

Hi glam_100,

There's no such a button in MultiCharts because it's not needed there. Unlike TS, MultiCharts uses multiple CPU cores and different processes are distributed onto different threads. So, even if a study calculation is taking forever, MultiCharts won't freeze. You still will be able to call the Format Study window and remove the study.

glam_100
Posts: 157
Joined: 14 Jun 2006
Has thanked: 2 times
Been thanked: 4 times

Postby glam_100 » 15 May 2008

The problem is that even when I remove the study the computer is still doing the calculation.

This button is needed because there are many times during strategy development that we would have wrongly written code (let's say we get into an infinite loop) and we would want to terminate the calculation.

Please consider adding such feature.

In the mean time is there a way to terminate the calculation. It seem the calculation is being continued by the PF editor rather than multichart process.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 15 May 2008

Well, the way it works is that if you remove/turn off a study it will complete all the calculations for the bar that's already being processed. After that the calculations will stop. There's no way to abort the calculation.

We are going to consider adding a button to abort study calculations in future MC version.

glam_100
Posts: 157
Joined: 14 Jun 2006
Has thanked: 2 times
Been thanked: 4 times

Postby glam_100 » 15 May 2008

When I remove the study it seems the calculation stops on MC but continue to process on PF editor. Is there a way to stop the calculation on PF editor as well?

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 16 May 2008

Hi glam_100,

Do you by any chance use the print function in your study?
If you do, what happens is simply that due to the large volume of data the process takes longer to finish the calculations on the currently processed bar.
There's no way to abort this before the calculations on the currently processed bar are finished.

glam_100
Posts: 157
Joined: 14 Jun 2006
Has thanked: 2 times
Been thanked: 4 times

Postby glam_100 » 16 May 2008

Hi Marina,

Yes I'm using the print function. This is very important because many times we would use the print function for debugging when the code are most unstable and easy to get into infinite loop situtaton.

I could abort the same study using the abort button in TS even with print function.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 20 May 2008

Hi glam_100,

The calculations are aborted. It is just that the when you use the print function, the results of the calculations that have already stopped keep being displayed.

glam_100
Posts: 157
Joined: 14 Jun 2006
Has thanked: 2 times
Been thanked: 4 times

Postby glam_100 » 20 May 2008

Is there anyway to stop the printing pipe as well? TS seems to have a way to do that cos I ran the same code on both MC and TS and I can quit all calculation and printing on TS after clicking on the abort button. I can immediately go back to work on the code where as in MC I had to kill MC everytime I ran into a long loop or inifinite loop with print function.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 21 May 2008

Hi glam_100,

Is there anyway to stop the printing pipe as well?


No. What you could do, though, is avoid printing out the results on every bar.

TS seems to have a way to do that cos I ran the same code on both MC and TS and I can quit all calculation and printing on TS after clicking on the abort button. I can immediately go back to work on the code where as in MC I had to kill MC everytime I ran into a long loop or inifinite loop with print function.


MC works in a differet whay. In MC, you can't quit calculation and printing right away.

Regards.


Return to “MultiCharts”