timeframe rec function pointer is missing from c++ header

How to create strategies and indicators
Message
Author
idesmaster
Posts: 6
Joined: Tue May 14, 2013 9:25 am

timeframe rec function pointer is missing from c++ header

#1 Postby idesmaster » Sat Sep 14, 2013 8:38 am

Dear Support,

I try to to follow syntax like below,
setCurrencyAndTimeframe(Symbol(), TimeFrame());

which i got from
http://forextester.com/forum/viewtopic.php?t=3523

I am using Visual C++ MS 2010, not lazarus.

Unfortunately, TimeFrame() is not defined in the .h file.

I have added n modified strategyinterfaceunit.h but no avail. no avail means the Timeframe symbol is there during build and link, but i got access violation during runtime.

I see the record structure (InterfaceProcRec) are different brom delphi and c++, so i assume i can just simply modified the InterfaceProcRec.

Kindly advise and many thanks.

fyi:
modification summary (cut-paste) is bellow, the modified .h file is attached.

Thanks

// add by idesmaster, Timeframe !!!
TGetIntegerFunc Timeframe;
void* pTimeframe;

// add by idesmaster
int Timeframe();

// add by idesmaster
int Timeframe()
{
//if (rec.Timeframe(rec.pTimeframe) == NULL) return 1;
return rec.Timeframe(rec.pTimeframe);
}
Attachments
StrategyInterfaceUnit.zip
Modified StrartegyInterfaceUnit.h to support Timeframe() but not working
(10.45 KiB) Downloaded 472 times
ehem..ehem...

Return to “FT API”

Who is online

Users browsing this forum: No registered users and 10 guests