Page 1 of 1

Programmatically adding MA to CCI indicator in Strategy

Posted: Wed Oct 04, 2017 4:50 pm
by imamushroom
Hi,

I've added a CCI indicator to my strategy but I know need to add a Moving Average to the CCI data. Under the MA indicator price parameter, there isn't an option to add an existing indicator so could you explain how I do this, please. I'm using C++.

Thanks,

Re: Programmatically adding MA to CCI indicator in Strategy

Posted: Thu Oct 12, 2017 7:27 am
by FX Helper
Hello,

Do you want to add an indicator to an indicator?
Or do you want to add a new parameter (indicator) in the properties of a strategy?

As far as I know, you can't do these both.

The only way is to get the data of your Moving Average via the method GetMA.

Re: Programmatically adding MA to CCI indicator in Strategy

Posted: Mon Oct 16, 2017 7:33 am
by imamushroom
Within a strategy that I am writing in C++ I want to put a moving average of the results returned from the CCI indicator programmatically. Is there a MovingAverageOnArray type of function that I can use or am I forced to create one myself?

Re: Programmatically adding MA to CCI indicator in Strategy

Posted: Tue Oct 31, 2017 8:01 am
by FX Helper
Hello,

Sorry, but Forex Tester program doesn't have iMAonArray function, only iMA.
So if you want to use an analog of iMAonArray function, the only way is to write it for yourself.

In other case, you need to add CCI indicator into a strategy.
You need to create it via CreateIndicator and then use GetIndicatorValue function (you can read about this functions in the Help files in the Forex Tester program).