JD
It depends. If your custom indicator is a series then you can use that directly as the source of any one of the Moving Averages functions (see the link for the description and syntax of these functions).
If instead it is not a series then you need to compute your indicator in a separate function or efs which you then call using either the efsInternal() or efsExternal() functions. (see the links for the description and syntax of these functions). These functions will return a series which you can then use as the source of any one of the moving average functions.
If you run a search in these forums using either efsInternal* or efsExternal* as the keyword you will find many examples of the use of these functions as this topic has been discussed at length before
Alex
Originally posted by xoprofittaker I am tying to create a moving average to app;y to a custom indicator I have created. What is the proper syntax to do that???
Those links were vary helpful. However a lot of it was still over my head.
I have attached the file of the EFS formula that I am working on. It deals with two issues. First a cumulative sum issue, which I am not sure that I got right, and secondly the moving average issue.
Due to the fact that the syntax error triggers at line 17 I can not find out if my moving average syntax is going to be ok.
I am getting a syntax error at line 17 because I am missing a ), allthough I have added an extra one, and I now have two of these ( and three of these ), it is still giving me a syntax error saying that I need one more )
John
The reason you are getting an error is because cumulativeSum is not a valid syntax as no such function exists in EFS nor is defined in your formula code.
If you are trying to calculate a cumulative total of your expression then you may want to review the solution JasonK already provided to you in this thread
As I explained in my previous post you will need to calculate the cumulative sum in a separate function that you then call from the main function using efsInternal() (see my prior reply for the links to the description of the function).
At that point you will have created a series that you can then use as a source for the moving average function.
Alex
Originally posted by xoprofittaker Those links were vary helpful. However a lot of it was still over my head.
I have attached the file of the EFS formula that I am working on. It deals with two issues. First a cumulative sum issue, which I am not sure that I got right, and secondly the moving average issue.
Due to the fact that the syntax error triggers at line 17 I can not find out if my moving average syntax is going to be ok.
I am getting a syntax error at line 17 because I am missing a ), allthough I have added an extra one, and I now have two of these ( and three of these ), it is still giving me a syntax error saying that I need one more )
Comment