Good morning.
I have a function that I can not compile with a MC but which compiles very well under TS.
Here is the error message.
""
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
"
This function is 11,500 lines may be that the reason for this problem?
so I delete about 2000 lines and I uen function with 950 lines and it does not always work the same error message.
you have a solution?
I note that there are no errors in my function and use commands classic
cordially
FRENCH
Bonjour.
j'ai une fonction que je n'arrive pas a compiler avec MC mais qui se compile tres bien sous TS .
voici le message d'erreur .
"
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
"
cette fonction fait 11500 lignes peut être que c'est la raison de ce problème ?
j'ai donc supprimer environ 2000 lignes et j'ai uen fonction avec 950 lignes et cela ne fonctionne pas toujours le même message d'erreur.
avez vous une solution ?
je signale qu'il y a pas d'erreurs dans ma fonction et utilise des commandes classique
cordialement
compil error function
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: compil error function
do a search on the word "causal".
There are a few threads on the problem and solution.
There are a few threads on the problem and solution.
-
- Posts: 70
- Joined: 17 Mar 2010
Re: compil error function
did a little research (I do not understand it )
but why I can compile with TS and not on mc?
and why my code is in gray in the power editor?
"
Study: "XCAP_fSavGol" (Function)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
"
FRENCH
j'ai fait une petite recherche ( j'ai pas tout compris ) mais pourquoi je peut le compiler avec TS et pas sur mc ?
but why I can compile with TS and not on mc?
and why my code is in gray in the power editor?
"
Study: "XCAP_fSavGol" (Function)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
"
FRENCH
j'ai fait une petite recherche ( j'ai pas tout compris ) mais pourquoi je peut le compiler avec TS et pas sur mc ?
Re: compil error function
Go to http://www.multicharts.com/discussion/v ... ff6#p34619
It describes the procedure to allow long code to be colored.
It describes the procedure to allow long code to be colored.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: compil error function
there are a number of possibilities:did a little research (I do not understand it )
but why I can compile with TS and not on mc?
and why my code is in gray in the power editor?
"
Study: "XCAP_fSavGol" (Function)
Please wait ....
------ Compiled with error(s): ------
Compile error
errLine 0, errColumn 0, errLineEnd 0, errColumnEnd 0
causal study: (Function)
"
FRENCH
j'ai fait une petite recherche ( j'ai pas tout compris ) mais pourquoi je peut le compiler avec TS et pas sur mc ?
1. some syntax is incorrect.
e.g. some keywords in MC requires a BEGIN and END, while it is not required in TS.
2. it is possible that your MC is corrupted. You might have to re-install MC.
-
- Posts: 70
- Joined: 17 Mar 2010
Re: compil error function
thank you for the link but I find it hard to understand because I'm French and speaks very little English, so if you could sum that I could solve my problem it would be nice
FRENCH
merci pour le lien mais j'ai beaucoup de mal a comprendre car je suis français et parle très mal anglais , donc si tu pouvais résumé pour que je puisse résoudre mon problème cela serais sympathique
FRENCH
merci pour le lien mais j'ai beaucoup de mal a comprendre car je suis français et parle très mal anglais , donc si tu pouvais résumé pour que je puisse résoudre mon problème cela serais sympathique
-
- Posts: 70
- Joined: 17 Mar 2010
Re: compil error function
TJ
can I send an attachment for the function even if you can compile?
FRENCH
puis je vous envoyer en fichier joint la fonction pour voire si vous vous pouvez la compilé ?
can I send an attachment for the function even if you can compile?
FRENCH
puis je vous envoyer en fichier joint la fonction pour voire si vous vous pouvez la compilé ?
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: compil error function
yes, you can send it to me by email or PM.TJ
can I send an attachment for the function even if you can compile?
FRENCH
puis je vous envoyer en fichier joint la fonction pour voire si vous vous pouvez la compilé ?
I can try to compile it for you with my MC.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: compil error function
The attachment in PM does not work.
you have to copy and paste the text to the PM.
you have to copy and paste the text to the PM.
-
- Posts: 70
- Joined: 17 Mar 2010
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: compil error function
This is a MC compiler limitation, around 8500 lines. In this case the function can be broken down into two to overcome the limit.
The OP referenced the work of Dr. Paul Griffin, https://www.TS.com/Discussion ... c_ID=58534
The OP referenced the work of Dr. Paul Griffin, https://www.TS.com/Discussion ... c_ID=58534
Savitzky-Golay Filters
Savitzky-Golay smoothing filters generate the solution to n-th order least squares fits to series data. The "trick", discovered by Savitzky and Golay in 1964, allows for the computing intensive part of the n-th order least squares fit to be pre-computed and stored as filters. This makes n-th order least squares fits computationally feasable with TS and with financial time-series data.
I pre-computed using Mathematica the filters for orders 1,2,3,4,5,6,7,8,16,32, and 64 and outputed the results into Easy Language format. It took a number of hours of CPU time complete this process, but again, this only has to be done once.
As generalizations of simple moving averages, opprotunities now exist in technical analysis to develop new trading strategies that replace ordinary moving averages with the Savitzky Golay versions -- for example Savitzky Golay crossovers where a higher order SG line crosses a lower order SG line.
Notes:
This filter method essentually treats the input as noise convolved with a nth order polynomial signal and provides that signal as output.
The filters I created are for convolution with data of the current bar ([0] in TS) and with Length bars in the past. Filters that use "future" bars to create an output for a past bar are not implimented.
The order 1 Savitzky Golay output is the same as the TS indicator output "Linear Reg Curve" as it should be since Linear Regression is a term indicating an order 1 least squares fit.
References:
The main coding reference:
"Numerical Recipies in C": http://www.nrbook.com/a/bookcpdf.php
Section 14.8 Savitzky-Golay Smoothing Filters
Wikipedia discussion:
http://en.wikipedia.org/wiki/Savitzky–G ... ing_filter
To read a good discussion of the standard way of performing least squares
fits in technical analysis and for further discusion of least squares, see "New Trading Systems and Methods", by Perry Kaufman, (fourth edition 2005) Chapter 6 as well as Appendix 2.
Enjoy!
Paul Griffin,
Extrema Capital Inc.
December 6, 2006.
-
- Posts: 70
- Joined: 17 Mar 2010
Re: compil error function
ok thank you,
I keep 8400 lines and compile ok
thank you very much
cordially
FRENCH
ok merci , j'ai garder 8400 lignes et compilation ok merci beaucoup
cordialement
I keep 8400 lines and compile ok
thank you very much
cordially
FRENCH
ok merci , j'ai garder 8400 lignes et compilation ok merci beaucoup
cordialement