Cancelling a compile seems problematic.

Questions about MultiCharts and user contributed studies.
bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Cancelling a compile seems problematic.

Postby bowlesj3 » 17 Jun 2008

This is not a big deal issue (for me especially since my EL systems are pretty much done) but I thought I would add it to the list (with entertainment).

My main system takes 10 minutes to compile. Today I forgot one of my changes and wanted to cancel it. I found the cancel button (EVENTUALLY) and clicked it. I got no response. So I was getting impatient (good/bad habit) and did the ctrl+Alt+Delete to kill the program completely. So then I tried to restart the editor and it would not restart no matter how many times I clicked and double clicked. Gee I was so surprised since even swearing would not help :-) and it always helps :-) :-). So then I rebooted the machine, restarted the editor with no problem, reimported my main study and everything was hunky dorry again.

Here is the most valuable lesson. I just realized that swearing is very valuable. You can look back at how stupid you were and laugh at yourself and have fun with it and maybe make some other people laugh too! Make that probably. As long as you don't break anything it should be okay.

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Postby TJ » 17 Jun 2008

It takes 10 min to compile? Impressive !!! You must have thousands of lines of code.

Maybe it helps to move some of the calculations to Functions? ;-)

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

I agree but.

Postby bowlesj3 » 18 Jun 2008

Actually Tj, I had one chunk of fairly large code that I put in a function using variables that could be shared with the calling code but it was just too hard to develop/maintain since there were about 20+ variables/inputs to share. The code was designed to detect swings in the market. I had tried the swing code supplied with MC but it could not handle the swings properly. With my code I found that long bars (that exceeded the swing size input parameter) screwed it up. There were two sets of code (one for the wave moving up and one for the wave moving down). The solution was to reverse the order if the bar was too long and there were a few tests related to this. It was at that point I tried the functions since I had duplication. However I took the functions out since they increased my maintainance work as outlined above.

So in the end it was easier to make a change to the up swing code, Duplicate it to the down swing code then copy these to the inverted duplication with a cut and paste. The speed of running won't be any faster with a function.

In Access there is no problem like this since you just define the variable as public and you can get at it from anywhere. You can define functions as you do in MC but why bother when you can just make a variable public and any function anywhere can get at it. Yah, VBA blows MC's EL away as a language generally. However EL is specialized and certainly has its place.

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

Re: Cancelling a compile seems problematic.

Postby Marina Pashkova » 19 Jun 2008

This is not a big deal issue (for me especially since my EL systems are pretty much done) but I thought I would add it to the list (with entertainment).

My main system takes 10 minutes to compile. Today I forgot one of my changes and wanted to cancel it. I found the cancel button (EVENTUALLY) and clicked it. I got no response. So I was getting impatient (good/bad habit) and did the ctrl+Alt+Delete to kill the program completely. So then I tried to restart the editor and it would not restart no matter how many times I clicked and double clicked. Gee I was so surprised since even swearing would not help :-) and it always helps :-) :-). So then I rebooted the machine, restarted the editor with no problem, reimported my main study and everything was hunky dorry again.

Here is the most valuable lesson. I just realized that swearing is very valuable. You can look back at how stupid you were and laugh at yourself and have fun with it and maybe make some other people laugh too! Make that probably. As long as you don't break anything it should be okay.
Hi John,

Cancelling compilation won't stop the process for the study that's currently being compiled. Only if you're compiling several studies, will the compilation stop the process for those that haven't been touched yet.

As for your study, 10 minutes is an extremely long time to have something compiled. It would be perfect if you could send us that study (modified, if necessary - if you don't want to disclose your trading logic), so that we could see why it might have taken so long.

Regards.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Slight correction.

Postby bowlesj3 » 19 Jun 2008

Actually I should clarifiy the time to compile.

On my notebook it is about 10 to 12 minutes.

On the desktop which is dual core AMD Athlon(tm) 64X2Dual Core Processor 3600+ 1.90 Ghz with 1.00 GB Ram it is about 5 or 6 minutes. (A guess).

Either way, having the cancel promptly take effect would be helpful when we forget a change and jump the compile prematurely.

If cancelling provides a risk of loosing the study, a nice feature would be an autobackup to pla of all changed studies prior to a compile (changed since the last compile). It would be good to have a date time stamp on the front of the pla and option to apply a comment. A user specified and remembered directory would be useful too so they will remember where these are. This way if the currently running compile is cancelled (or even if it is not) users have lots of backups. Even better would be a way to backup the whole thing and a way to find the ones that were changed and not yet compiled (extra backups).

Thanks,
John.

bowlesj3
Posts: 2180
Joined: 21 Jul 2007
Has thanked: 227 times
Been thanked: 429 times

Auto cleanup of backups

Postby bowlesj3 » 20 Jun 2008

To me it should be possible to cancel a compile in the running and to save to pla a study which is compiled or not. I always thought that a text file was the source and the compile was either a tockenized partial copy or a fully machine code executable copy (souce text is just an input file to these processes and is at no risk of corruption). If this is not true with EL then it is strange indeed in my mind. If this is true with EL then the above backup feature should be possible as well as an auto purge of any of these auto backups such that only the previous month and this month are kept (user can extend this if they want). If a PLA contains both the source and the machine compile then that is good but should not interfer with this idea.


Return to “MultiCharts”