Hi all, I'm trying to compile a trading systems which uses the Ematrend addon as signal. However I cannot compile it in Powerlanguage as I get the following error:
------ Compiled with error(s): ------
Unknown Function
where the unknown functions is Ematrend. I thought it would have been recognized as Ematrend is available among MC indicators, but it seems it does not.
Any help appreciated, thanks
Compilation error [SOLVED]
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Compilation error
What do you mean by "uses the Ematrend addon as signal" ?Hi all, I'm trying to compile a trading systems which uses the Ematrend addon as signal. However I cannot compile it in Powerlanguage as I get the following error:
------ Compiled with error(s): ------
Unknown Function
where the unknown functions is Ematrend. I thought it would have been recognized as Ematrend is available among MC indicators, but it seems it does not.
Any help appreciated, thanks
How are you applying it? Please give detail.
Re: Compilation error
Hi TJ,What do you mean by "uses the Ematrend addon as signal" ?Hi all, I'm trying to compile a trading systems which uses the Ematrend addon as signal. However I cannot compile it in Powerlanguage as I get the following error:
------ Compiled with error(s): ------
Unknown Function
where the unknown functions is Ematrend. I thought it would have been recognized as Ematrend is available among MC indicators, but it seems it does not.
Any help appreciated, thanks
How are you applying it? Please give detail.
Ematrend is a proprietary indicator available among MC's addons indicator list.
When trying to compile in Powerlanguage editor a trading system which uses Ematrend (in a way like if C>Ematrend then buy...) I get the above mentioned "unknown function" error.
Thus I think I've to get Ematrend recognized by MC.
regards
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Compilation error
Hi TJ,
Ematrend is a proprietary indicator available among MC's addons indicator list.
When trying to compile in Powerlanguage editor a trading system which uses Ematrend (in a way like if C>Ematrend then buy...) I get the above mentioned "unknown function" error.
Thus I think I've to get Ematrend recognized by MC.
regards
You have misunderstood the application.
Ematrend is an indicator. It plots a line on the chart.
Ematrend is NOT a function. You cannot apply it the way as you described.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Compilation error
You can go to PLE for examples of using functions in signal.
eg.
AverageFC is a function.
You can find examples of AverageFC in the following Signals:
MovAvg Cross LE
MovAvg Cross LX
MovAvg Cross SE
MovAvg Cross SX
Please open the scripts and study the code.
eg.
AverageFC is a function.
You can find examples of AverageFC in the following Signals:
MovAvg Cross LE
MovAvg Cross LX
MovAvg Cross SE
MovAvg Cross SX
Please open the scripts and study the code.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Compilation error
Thanks TJ and yes, as I wrote Ematrend is an indicator.Hi TJ,
Ematrend is a proprietary indicator available among MC's addons indicator list.
When trying to compile in Powerlanguage editor a trading system which uses Ematrend (in a way like if C>Ematrend then buy...) I get the above mentioned "unknown function" error.
Thus I think I've to get Ematrend recognized by MC.
regards
You have misunderstood the application.
Ematrend is an indicator. It plots a line on the chart.
Ematrend is NOT a function. You cannot apply it the way as you described.
Please let me paste a screenshot of the Powelangiage window so that I can show which kind of erro I get while trying to compile
https://gyazo.com/4a96591a11660bfb20a6ccc2a5d7f36b
As you can see, MC does not know what Ematrend is, even if it's among the available platform indicator.
- ABC
- Posts: 723
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
Re: Compilation error [SOLVED]
Leo,
you can't call indicators like you are trying to do. This is only doable with a function. Just because you have an indicator called "Ematrend" doesn't mean there is a function with the same name.
If the function doesn't exist you will receive the error message that you are seeing on your end.
There are two solutions now:
1. You could create a function that does what the Ematrend indicator does. However as you have pointed out this is an Addon and you likely can't access the source code of it. So this might not be a viable solution and you'd have to stick to option 2.
2. TJ posted a link for you in an earlier post on how to apply studies on studies. You can use the same approach within your signal and call an indicator, but you need to follow the syntax that the thread shows. As a hint you can try to apply your Ematrend as a study on the Custom 1 Line indicator and copy and paste the resulting input value into your strategy code. This will help finding out what exactly needs to be done.
Regards,
ABC
you can't call indicators like you are trying to do. This is only doable with a function. Just because you have an indicator called "Ematrend" doesn't mean there is a function with the same name.
If the function doesn't exist you will receive the error message that you are seeing on your end.
There are two solutions now:
1. You could create a function that does what the Ematrend indicator does. However as you have pointed out this is an Addon and you likely can't access the source code of it. So this might not be a viable solution and you'd have to stick to option 2.
2. TJ posted a link for you in an earlier post on how to apply studies on studies. You can use the same approach within your signal and call an indicator, but you need to follow the syntax that the thread shows. As a hint you can try to apply your Ematrend as a study on the Custom 1 Line indicator and copy and paste the resulting input value into your strategy code. This will help finding out what exactly needs to be done.
Regards,
ABC
Re: Compilation error
Hi ABC,You can use the same approach within your signal and call an indicator, but you need to follow the syntax that the thread shows. As a hint you can try to apply your Ematrend as a study on the Custom 1 Line indicator and copy and paste the resulting input value into your strategy code. This will help finding out what exactly needs to be done.
kindly could you attach a few lines of code to show how to do that with Ematrend ?
It would be very useful to learn a new programming possibility.
Thanks in advance.
Massimo