Can't compile studies in PL Editor

Questions about MultiCharts and user contributed studies.
User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Can't compile studies in PL Editor

Postby Laurentius » 03 Jan 2011

Hello,

Since trial version I have never succeeded in compiling a study in PL Editor. With the trial version I thought that maybe the trial did not allow me compiling custom studies, but now it is the same with licensed version. In "Insert Study" I always get the "Ready Status" as "No".

Have tried with several versions from both the "User Contributed..." forum and Big Mikes MC section. All with the same results. I am using the standard routine for importing studies in PL Editor, so that part should be fine. Have a couple of read only studies which I had no trouble with importing.

As an example when importing the SuperTrend indicator with two belonging functions I get the results:

Study: "SuperTrend" (Indicator)
Please wait ....
------ Compiled with error(s): ------
unverified function is used
errLine 12, errColumn 5, errLineEnd 12, errColumnEnd 15
causal study: supertrend (Function)

Study: "SuperTrend" (Function)
Please wait ....
------ Compiled with error(s): ------
unverified function is used
errLine 23, errColumn 7, errLineEnd 23, errColumnEnd 12
causal study: jthma (Function)

Study: "jtHMA" (Function)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)

I have understood that if the SuperTrend indicator did not have the two belonging functions I would get the same error "0" results for that one alone as with the last message for the "jtHMA" function.

OS is Vista SP2 with Comodo Firewall/Antivirus. Read in the "Tips, tricks, programs, etc for MC resource Management" thread that the antivirus module of Comodo would interfere with PL Editor, so I added pleditor.exe as trusted in both firewall, defense+ and ignore in antivirus module, but with no change. Have also set "Users" to full control of the TS Program Files folder.

Could anyone please help me with this issue?

Thank you.

Laurentius

User avatar
TJ
Posts: 6304
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 951 times
Been thanked: 1814 times

Re: Can't compile studies in PL Editor

Postby TJ » 03 Jan 2011

this is the jtHMA function that I have.
you can compare it with yours



Code: Select all

{jtHMA - Hull Moving Average Function}
{Author: Atavachron}
{May 2005}      
   
Inputs: price(NumericSeries), length(NumericSimple);
Vars: halvedLength(0), sqrRootLength(0);

{
 Original equation is:
 ---------------------
 waverage(2*waverage(close,period/2)-waverage(close,period), SquareRoot(Period)
 Implementation below is more efficient with lengthy Weighted Moving Averages.
 In addition, the length needs to be converted to an integer value after it is halved and
 its square root is obtained in order for this to work with Weighted Moving Averaging
}

if ((ceiling(length / 2) - (length / 2))  <= 0.5) then
   halvedLength = ceiling(length / 2)
else
   halvedLength = floor(length / 2);

if ((ceiling(SquareRoot(length)) - SquareRoot(length))  <= 0.5) then
   sqrRootLength = ceiling(SquareRoot(length))
else
   sqrRootLength = floor(SquareRoot(length));

Value1 = 2 * WAverage(price, halvedLength);
Value2 = WAverage(price, length);
Value3 = WAverage((Value1 - Value2), sqrRootLength);

jtHMA = Value3;


User avatar
TJ
Posts: 6304
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 951 times
Been thanked: 1814 times

Re: Can't compile studies in PL Editor

Postby TJ » 03 Jan 2011

ps. Big Mike has a version of SuperTrend that does not use jtHMA.

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 03 Jan 2011

Thank you very much for the quick reply TJ.

I checked the code and it is the same which I have. The one I have is in the .pla from Big Mike. I downloaded the .pla from post #5 here: http://www.bigmiketrading.com/tradestat ... cator.html

I do not think that the problem has something to do with any of the codes in the studies I have tried to compile. I have tried to just change the default 12,26,9 settings in the code for the MC native MACD to 13,26,9 and then compiling, but with the samme errors and then unfortunately making the MACD inaccessible.

I am thinking that maybe Vista are prohibiting PL Editor in accessing the files, but I have been unsuccessful in finding where the compiled indicators in MC are located on the hardrive. My system and Program Files are on a different partition than (My) Documents, Music and so on folders. Vista and Program Files on C:\ and for the other user folders mentioned I have set Vista to automatically use D:\.

Laurentius

User avatar
TJ
Posts: 6304
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 951 times
Been thanked: 1814 times

Re: Can't compile studies in PL Editor

Postby TJ » 03 Jan 2011

try starting PLEditor as administrator.

also try turning off the User Account Control.
>control panel >user control

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 487 times

Re: Can't compile studies in PL Editor

Postby Dave Masalov » 04 Jan 2011

Dear Laurentius,

This is a known issue. Occurs for two reasons. Please try the following:

Check the contents of the file

"%allusersprofile%\Application Data\TS Support\MultiCharts\StudyServer\Studies\compiler_error.log"

(1) If file "compiler_error.log" contains an error that MultiCharts could not find something, for example:

“C:\PROGRA~1\TS Support\MultiCharts\make\MinGW\bin\dlltool: Can't open def file: C:\PROGRA~1\TS

C:\PROGRA~1\TS Support\MultiCharts\make\MinGW\bin\dllwrap.exe:
C:\PROGRA~1\TS Support\MultiCharts\make\MinGW\bin\dlltool exited with status 1”

Then there is an issue with GCC short paths.

Fix:

~~~~~~~~~~~~

1. In the registry define the value:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]

"NtfsDisable8dot3NameCreation"=dword:00000000

2. Uninstall МultiСharts

3. Delete the directory “%ProgramFiles%/TS Support/” (or wherever it was installed)

4. Reboot computer

5. Install МultiСharts



(2) File "compiler_error.log" contains an error with "VirtualAlloc", for example:

“Internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:151: VirtualAlloc (commit):

C:\PROGRA~1\TSSUPP~1\MULTIC~1\STUDYS~1\Studies\SrcCpp\INDICA~1\I_SBTE~1.CPP:1:
fatal error: can't read PCH file: Invalid argument

Compilation terminated.”

Then this is an addressing issue (the computer has watchers that interject path which is used for loading .gch files)

Fix

~~~~~~~~~~~~

1. Close MultiCharts, or MCFX Pro AND PowerLanguage

2. Copy the attached zip archive onto your machine, unpack it.

3. Run makegch_MC.bat or makegch_MCFX.bat depending on your platform.

P.S.

If this does not work, a remote connection is necessary from the Live Chat help desk.
Attachments
MakeGCH_elapiver_256.zip
(70.44 KiB) Downloaded 252 times
These users thanked the author Dave Masalov for the post:
rjelles

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 04 Jan 2011

Thank you very much for your efforts TJ and Dave!

Checked the log file and the second case described the problem. Ran makegch_MC.bat and now it is working.

I was a wonderful experience to finally see "Compiled successfully" : )

Tanks,
Laurentius

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 487 times

Re: Can't compile studies in PL Editor

Postby Dave Masalov » 05 Jan 2011

Dear Laurentius,

Glad to hear that the issue has been solved.

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 12 Jan 2011

Just thought I could help out and add the exact path for the compiler_error.log file in Windows Vista in case someone else encountered the same problem in the future. The exact path is:

C:\ProgramData\TS Support\MultiCharts\StudyServer\Studies

Probably the same with Windows 7

If the \ProgramData\ folder is not visible, then Windows is set to "Do not show hidden files and folders" in "Folder Options". When in C:/ root directory (first place you enter after double clicking your C:\ hard drive icon in Computer) click "Tools" and select "Folder Options" in the menu bar. Then select the "View" tab. In the "Advanced settings" box one have to select "Show hidden files and folders". Then press Ok. It will now be visible.

Laurentius

User avatar
siscop
Posts: 170
Joined: 09 Jan 2011
Has thanked: 30 times
Been thanked: 21 times

Re: Can't compile studies in PL Editor

Postby siscop » 13 Jan 2011

This error msg:

Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)

That seems to happen when you have Comodo Firewall/antivir security on your system. I didnt have that error msg before installing Comodo and after I deinstalled it.
Just a shutdown of a installed Comodo doesn't help. I had to deinstall that SW.
Your workarround of updating MC does help. I just wanted to make you know for your next version that comodo is a rough one.

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 13 Jan 2011

Thank you siscop. Good to know.

User avatar
piranhaxp
Posts: 236
Joined: 18 Oct 2005
Has thanked: 4 times
Been thanked: 29 times

Re: Can't compile studies in PL Editor

Postby piranhaxp » 13 Jan 2011

TS has the same issue in combination with Commodo Firewall or Security Suite. I can't remember right now, but there was an issue with one dll used from both.

Regards.

Mike

fibdax
Posts: 80
Joined: 03 Jan 2011
Has thanked: 5 times
Been thanked: 4 times

Re: Can't compile studies in PL Editor

Postby fibdax » 05 Apr 2011

I have the same error after installing beta 7 MULTICHART can use the following fix?

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 05 Apr 2011

fibdax wrote:I have the same error after installing beta 7 MULTICHART can use the following fix?


Yes. I used it and got no errors. So it seems to work ok. The path in makegch_MC.bat is right.

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 19 Apr 2011

Sorry. I take back what I wrote in previous post.

Andrew was kind to have a new "MakeGCH_elapiver" made for MC 7, so now PL Editor works as it should when you have Comodo Internet Security suite installed.

I have attached the file I received from Andrew today.

These are the instructions:
1. Close all MultiCharts programs running.
2. Run Task Manager and check if the following processes have gone: Multicharts.exe, messagecenter.exe, quotemanager.exe, tsserver.exe, pleditor.exe, studyserver.exe, tradingserver.exe, mcportfolio.exe
3. Run “updater.exe” and click on “update”. Make sure there are no errors in the log of updater.
4. Close updater and run MultiCharts / PL Editor again.

Laurentius

Edit: Before downloading please read second post below, written 28th of May.
Attachments
MakeGCH_elapiver_152_MCv7.zip
PL Editor fix for users with Comodo Internet Security suite
(354.89 KiB) Downloaded 161 times
Last edited by Laurentius on 29 May 2011, edited 2 times in total.
These users thanked the author Laurentius for the post (total 3):
TJStan BokovFilly

User avatar
Stan Bokov
Posts: 963
Joined: 18 Dec 2009
Has thanked: 367 times
Been thanked: 299 times

Re: Can't compile studies in PL Editor

Postby Stan Bokov » 20 Apr 2011

Thanks for sharing Laurentius.

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

MakeGCH_elapiver_152_MCv7 does not work with MC 7 Beta 4

Postby Laurentius » 27 May 2011

I would just notify that MakeGCH_elapiver_152_MCv7, which was posted two posts ago, does not work with MC 7 Beta 4.

It produces the same problem as when using the MakeGCH_elapiver_256 with previous MC 7 beta versions, which is that it installs fine and PLEditor seems to compile custom studies fine, but it is not possible to insert them on a chart. Nothing shows up after selecting a study.

Laurentius

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 01 Jun 2011

With many thanks to Andrew I received a new version (153) of the MakeGCH_elapiver for MC 7 beta 4 today : )

Instructions:
1. Close all MultiCharts programs running.
2. Run Task Manager and check if the following processes have gone: Multicharts.exe, messagecenter.exe, quotemanager.exe, tsserver.exe, pleditor.exe, studyserver.exe, tradingserver.exe, mcportfolio.exe
3. Run “updater.exe” and click on “update”. Make sure there are no errors in the log of updater.
4. Close updater and run MultiCharts / PL Editor again.


Laurentius
Attachments
MakeGCH_elapiver_153_MC7b4.zip
(354.91 KiB) Downloaded 118 times
These users thanked the author Laurentius for the post (total 3):
TJsiscopStan Bokov

User avatar
siscop
Posts: 170
Joined: 09 Jan 2011
Has thanked: 30 times
Been thanked: 21 times

Re: Can't compile studies in PL Editor

Postby siscop » 02 Jun 2011

@Laurentius
Why don’t you just drop Comodo? MC isn’t the only SW that I had problem with it.
Don’t get me wrong this SW is very secure but if it starts to block your normal work and this can’t be fixed without workarounds and there are enough substitute around then just drop it.

btw
Thank you for the fix ;-D
These users thanked the author siscop for the post (total 2):
LaurentiusStan Bokov

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 02 Jun 2011

I see your point Siscop, but I have not found any other firewall that satisfy my needs, that is low system load and security management. My impression is that Comodo has the best firewall, so I only install this with the Defense+. For antivirus I use Avast for its low system load fast scanning performance.

As an example ZoneAlarm is secretly sending encrypted information back to their servers even if one set it to notify when it goes on the internet. Additionally there is some features I miss with it.

If you have a good suggestion I would be interested to know.

Laurentius

User avatar
siscop
Posts: 170
Joined: 09 Jan 2011
Has thanked: 30 times
Been thanked: 21 times

Re: Can't compile studies in PL Editor

Postby siscop » 02 Jun 2011

FW on your router for ingoing packages. “Windows7 Firewall control” for outgoing packages, but I don’t want to start a do or don’t of personal firewalls - what do you require what your included FW does not have?

Do you know highjackthis? Try running that once and a while.
These users thanked the author siscop for the post:
Laurentius

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 07 Oct 2011

I would just like to notify that the fix in MakeGCH_elapiver_153_MC7b4.zip in post #18 does not work with MC 7.1 Beta1.

Laurentius
These users thanked the author Laurentius for the post:
JoshM

User avatar
Henry MultiСharts
Posts: 8157
Joined: 25 Aug 2011
Has thanked: 1166 times
Been thanked: 2589 times

Re: Can't compile studies in PL Editor

Postby Henry MultiСharts » 10 Oct 2011

Here is the new updater to fix the compilation issue on MultiCharts 7.1 beta 1.
1) Please close Multicharts and all its windows.
Check that all MC processes are ended in Task manager:
MultiCharts.exe
MessageCenter.exe
QuoteManager.exe
tsServer.exe
PLEditor.exe
StudyServer.exe
TradingServer.exe
atCenterServer.exe
TPserver.exe
Fixserver.exe
2) Unzip the archive.
3) Run Updater.exe and click on Update.
Attachments
MakeGCH_elapiver_155_MC7.1b1.zip
(355.03 KiB) Downloaded 190 times
These users thanked the author Henry MultiСharts for the post:
Laurentius

Fu510n
Posts: 10
Joined: 05 May 2011
Has thanked: 18 times
Been thanked: 4 times

Re: Can't compile studies in PL Editor

Postby Fu510n » 25 Nov 2011

Is there a patch for 7.2 (beta or whenever it goes GA)? I'm unable to compile anything (getting the "usual" PCH error in the compiler log) on a Windows 7/64 box (with SUA installed BTW so curious if that's part of the issue for some).

Thanks,
-Guy

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 25 Nov 2011

Hello Fu510n,

If you are using Comodo Internet Security, what you can do is disable Defence+. Defence+ is the module with Comodo that is preventing successful compiling.

If using Comodo, just double click Comodo in notification area and select Defence+ tab. Then click Defence+ settings down in the right. Pull the slider down to Disabled as in the attached picture and then restart computer. This works with Comodo.

Laurentius
Attachments
Disable Defence+.png
(22.54 KiB) Downloaded 213 times

Fu510n
Posts: 10
Joined: 05 May 2011
Has thanked: 18 times
Been thanked: 4 times

Re: Can't compile studies in PL Editor

Postby Fu510n » 25 Nov 2011

Laurentius wrote:Hello Fu510n,

If you are using Comodo Internet Security, what you can do is disable Defence+. Defence+ is the module with Comodo that is preventing successful compiling.

If using Comodo, just double click Comodo in notification area and select Defence+ tab. Then click Defence+ settings down in the right. Pull the slider down to Disabled as in the attached picture and then restart computer. This works with Comodo.

Laurentius


Unfortunately I'm not using Comodo (using BitDefender Pro actually) but was glad to see that I'm at least seeing one of the known errors. I'm able to compile fine on another Windows 7/64 laptop I have but it doesn't have some of the other developer tools I have on my desktop (Subsystem for UNIX-based Applications; aka "SUA" among them). I recall not having the issue with earlier versions of 7.0, but I may have installed SUA between 7.0 and 7.2 so that's definitely "suspect".

Just curious - thanks for the tip re: Comodo tho.

User avatar
Henry MultiСharts
Posts: 8157
Joined: 25 Aug 2011
Has thanked: 1166 times
Been thanked: 2589 times

Re: Can't compile studies in PL Editor

Postby Henry MultiСharts » 25 Nov 2011

Fu510n wrote:Is there a patch for 7.2 (beta or whenever it goes GA)? I'm unable to compile anything (getting the "usual" PCH error in the compiler log) on a Windows 7/64 box (with SUA installed BTW so curious if that's part of the issue for some).

Thanks,
-Guy

Have you tried the updater for MultiCharts 7.1 beta 1 ?
If it does not fix the issue-please come to our live chat Monday-Friday 6:30 am - 4 pm EST.
We will do our best to help you.

User avatar
Laurentius
Posts: 90
Joined: 01 Jan 2011
Location: Europe
Has thanked: 138 times
Been thanked: 36 times

Re: Can't compile studies in PL Editor

Postby Laurentius » 25 Nov 2011

Hello Henry,

The updater for MultiCharts 7.1 beta 1 did not work with 7.2 for my part. That's why I did some research and found out that I could disable Defence+ in Comodo. But I had to un-/reinstall MC 7.2 after applying the 7.1 beta 1 updater to make it work as normal.

Laurentius


Return to “MultiCharts”