RegApplyToPriceOption and RegMATypeOption problem

Bug reports and errors in the program
Message
Author
tpr
Posts: 4
Joined: Mon Mar 17, 2014 12:00 pm

RegApplyToPriceOption and RegMATypeOption problem

#1 Postby tpr » Mon Mar 17, 2014 12:05 pm

Hi,

I try to create my own indicator using MS Visual 2010 C++.
I have problem with RegApplyToPriceOption(), RegMATypeOption() functions.
Here is piece of code:

Code: Select all

TPriceType ApplyToPrice = pt_HLC3;
TMAType MAType = ma_EMA;
RegApplyToPriceOption((int&)ApplyToPrice, "Apply to Price");
RegMATypeOption((int&)MAType, "MA Type");


These function seem to ignore initial values of variables.
I can set new values and then everything is OK.
But first time indicator properties window appears
there is "Close" and "SMA" instead of "Open" and "(High+Low+Close)/3".

BTW - RegApplyToPriceOption() and RegMATypeOption() are not metioned in Indicator API manual.

Thanks,
tpr

KelvinHand
Posts: 103
Joined: Sun Jan 02, 2011 6:05 pm

Re: RegApplyToPriceOption and RegMATypeOption problem

#2 Postby KelvinHand » Tue Mar 18, 2014 12:09 am

tpr wrote:Hi,

I try to create my own indicator using MS Visual 2010 C++.
I have problem with RegApplyToPriceOption(), RegMATypeOption() functions.
Here is piece of code:

Code: Select all

TPriceType ApplyToPrice = pt_HLC3;
TMAType MAType = ma_EMA;
RegApplyToPriceOption((int&)ApplyToPrice, "Apply to Price");
RegMATypeOption((int&)MAType, "MA Type");


These function seem to ignore initial values of variables.
I can set new values and then everything is OK.
But first time indicator properties window appears
there is "Close" and "SMA" instead of "Open" and "(High+Low+Close)/3".

BTW - RegApplyToPriceOption() and RegMATypeOption() are not metioned in Indicator API manual.

Thanks,
tpr



Yes. There is a bug in each function. Just need to goto technicalfunctions.h
Remark the option before function return

void RegApplyToPriceOption(int& option, PChar name)
{
...
//option = 0;
}

RegMATypeOption(int& option, PChar name)
{
....
//option = 0;

}

tpr
Posts: 4
Joined: Mon Mar 17, 2014 12:00 pm

Re: RegApplyToPriceOption and RegMATypeOption problem

#3 Postby tpr » Tue Mar 18, 2014 6:58 am

Thank you, it is OK now.
Anyway I hope it will be fixed "officially" (in patch).
It is kind of weird to fix on my own code provided with ForexTester software.

Regards,
tpr


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 1 guest