C++ API Bug

How to create strategies and indicators
Message
Author
FinGeR
Posts: 72
Joined: Wed Apr 23, 2008 12:24 pm

C++ API Bug

#1 Postby FinGeR » Sat Aug 29, 2009 5:47 am

- Volume()
Attachments
Capture_024.gif
Capture_024.gif (42.23 KiB) Viewed 15035 times
Capture_023.gif
Capture_023.gif (14.86 KiB) Viewed 15035 times

FinGeR
Posts: 72
Joined: Wed Apr 23, 2008 12:24 pm

#2 Postby FinGeR » Sat Aug 29, 2009 5:52 am

GetMA()
RegMATypeOption()
EMA is always SMA Periode 1
Attachments
Capture_025.gif
Capture_025.gif (24.33 KiB) Viewed 15034 times

User avatar
Terranin
Site Admin
Posts: 833
Joined: Sat Oct 21, 2006 4:39 pm

#3 Postby Terranin » Thu Sep 17, 2009 11:32 am

On the first picture there is possible an error in code buffer[index] = buff[index + 1]

In this case you will get an error when you are trying to access index = bars - 1, because there is no index = Bars.
Hasta la vista
Mike

adekat
Posts: 7
Joined: Sun Jul 18, 2010 2:03 am

GetMA ma_WMA bug?

#4 Postby adekat » Sun Jul 18, 2010 2:11 am

TechnicalFunctions.h ‎2010‎/3/‎27

double GetMA(
case ma_WMA:

bug
for (i=index; i < index+period; i++)


good
for (i=0; i < period; i++)

User avatar
Terranin
Site Admin
Posts: 833
Joined: Sat Oct 21, 2006 4:39 pm

Re: GetMA ma_WMA bug?

#5 Postby Terranin » Sun Jul 18, 2010 11:13 am

adekat wrote:TechnicalFunctions.h ‎2010‎/3/‎27

double GetMA(
case ma_WMA:

bug
for (i=index; i < index+period; i++)


good
for (i=0; i < period; i++)


Thanks, fixed.
Hasta la vista

Mike

adekat
Posts: 7
Joined: Sun Jul 18, 2010 2:03 am

GetMA ma_EMA bug?

#6 Postby adekat » Mon Jul 19, 2010 6:26 am

TechnicalFunctions.h ‎2010‎/3/‎27

double GetMA(
case ma_EMA:

ng (k=0,1,2)
k = 2/(period + 1);

good
k = (double)2/(period + 1);


compile with Microsoft Visual c++ express

User avatar
Terranin
Site Admin
Posts: 833
Joined: Sat Oct 21, 2006 4:39 pm

Re: GetMA ma_EMA bug?

#7 Postby Terranin » Mon Jul 19, 2010 11:16 am

adekat wrote:TechnicalFunctions.h ‎2010‎/3/‎27

double GetMA(
case ma_EMA:

ng (k=0,1,2)
k = 2/(period + 1);

good
k = (double)2/(period + 1);


compile with Microsoft Visual c++ express


Fixed.
Hasta la vista

Mike


Return to “FT API”

Who is online

Users browsing this forum: No registered users and 10 guests