I get the users's MA type from:
fpArray[x] = new FunctionParameter("Type", FunctionParameter.STRING);
with (fpArray[x++]) {
fpArray[x-1].setName("Type");
fpArray[x-1].addOption("MAStudy.SIMPLE");
fpArray[x-1].addOption("MAStudy.EXPONENTIAL");
fpArray[x-1].addOption("MAStudy.WEIGHTED");
fpArray[x-1].addOption("MAStudy.VOLUMEWEIGHTED");
}
buy when I use "Type" as follows:
fMA = new MAStudy(Length, 0, Source, Type );
I get:
Error: Parameter number 4 of function MAStudy is invalid
The source parameter is exactly the same and that works. I'm guessing the source is text and Moving Average Type is not.
How can I solve this? Help please.
Thanks.
fpArray[x] = new FunctionParameter("Type", FunctionParameter.STRING);
with (fpArray[x++]) {
fpArray[x-1].setName("Type");
fpArray[x-1].addOption("MAStudy.SIMPLE");
fpArray[x-1].addOption("MAStudy.EXPONENTIAL");
fpArray[x-1].addOption("MAStudy.WEIGHTED");
fpArray[x-1].addOption("MAStudy.VOLUMEWEIGHTED");
}
buy when I use "Type" as follows:
fMA = new MAStudy(Length, 0, Source, Type );
I get:
Error: Parameter number 4 of function MAStudy is invalid
The source parameter is exactly the same and that works. I'm guessing the source is text and Moving Average Type is not.
How can I solve this? Help please.
Thanks.
Comment