Recently I've got a task to build a data plugin for AmiBroker.
And I've read the project Data_Template from ADK.
My boss wants a data plugin that can load fresh data like myTrack real-time plugins and it confused me.
I've asked some people with experience ,they told me to run the demo 'QT' from ADK,but some errors exit in it.
Then, I got a c# demo from github and I put it in amibroker .however ,I cannot find it from Amibroker's datasource selection.This c# demo is exactly a data plugin ,not afl plugin.BUT I cannot find it's name from datasource selection .Has anyone know about it ? Any help will be thanksful
You description is very vague.
If you are using a demo, you ought to link it so someone can relate easily.
If you are getting some errors, how does "some errors" help us?
Did you copy the DLL to the plugin folder?
sorry,
here shows that demo's error,
the demo names QT in ADK,file names Plugin.cpp.
For that c# demo ,I've solved it .THANKS
sorry,
here shows that demo's error,
the demo names QT in ADK,file names Plugin.cpp.
For that c# demo ,I've solved it .THANKS~
sorry ,I should open it with vc6.0~
No. It got nothing to do with having to open it in VC6.0 to make it work.
.c, .cpp, .h files are source files and portable to any IDE.
The reason for your error is that some compilers do not recognize variables being declared in loop statement and which are recalled later outside of loop statement again. So in your IDE iSymbol is unknown later on in that 'if' statement after the loop.
So solution is this...
Simply declare iSymbol outside of for loop.
int iSymbol;
for( iSymbol = 0; g_aInfos && iSymbol < RecentInfoSize && g_aInfos[ iSymbol ].Name && g_aInfos[ iSymbol ].Name[ 0 ]; iSymbol++ )
{
if( ! stricmp( g_aInfos[ iSymbol ].Name, pszTicker ) )
{
ri = &g_aInfos[ iSymbol ];
return ri; // already exists - do not need to add anything
}
}
DLL programming requires C++ programming knowledge and Windows programming knowledge. ADK is provided only for people who understand how to use their C++ compiler and understand the difference between variable scope in their compiler. Whenever variable declared in for()
loop is visible later or not is a matter of compiler setting. As a C++ plugin writer you are expected to know such things. QT example was written back in 2003 or something with VC6, since then Microsoft changed default behavior of compiler. Anyway the QT example just works. As any other example in ADK just works. QT example is a MFC project so you must have a compiler with MFC support. As for debugging see this: I want to Debug DLL in VS 2010,but can not run Broker.exe ,Why?
See also: http://www.amibroker.com/kb/2012/05/05/third-party-plugins-must-ship-with-proper-runtime/