Australian (ASX) Stock Market Forum

How to create a dll file for Amibroker?

I have done this and the c++ code is good*; I have compiled my .dll file
But now in Amibroker /Analysis/formulas editor

I type

Code:
hellobigboy();

and press with the menu Tools/verify syntax .
No bug but nothing happening .It seem that I can’t do this in AFL .It seems that AFL code is only for the “Analysis Windows”

Later I think to do a customized button and as soon as I press the button then I see “hello World” .And later I can imagine more complexe windows with combobox , listbox in c++ code …(Even if I am not programmer ; I have got any experiences )

But is-it possible ?
Am I be able to do this by taking the menu Tools/customize ?
How to launch the c++ macro ?

Code:
#include "stdafx.h"
#include "Plugin.h"
#include "math.h"
#ifndef ASSERT
#include "assert.h"
#define ASSERT assert
#endif

# include <iostream>
using namespace std;

 AmiVar monsalutperso(int NumArgs, AmiVar *ArgsTable)
{
    cout<<"Hello World!\n";
    cin.get();

	AmiVar myvarTest;
	myvarTest.type = VAR_NONE; 

	return myvarTest;
}

/////////////////////////////////////////////
// Function table now follows
// "Function name", { FunctionPtr, <no. of array args>, <no. of string args>, <no. of float args>, <no. of default args>, <pointer to default values table float *>

FunctionTag gFunctionTable[] = {
	                            "hellobigboy",				{ monsalutperso, 0, 0, 0, 0, NULL }, 
								
};

int gFunctionTableSize = sizeof( gFunctionTable )/sizeof( FunctionTag );
 
Hello , I need your help to create a .dll file by using the bloodshed IDE and that Amibroker can recognize as soon as I press the "Load" button in the plugins Amibroker's Window .

If somebody can put a sample "hello World" code to compile in .dll format and give some explanations ...
Thanks.

Hi atlas,

I may have covered something similar to this using codeblocks (with gcc) recently in my thread titled "Creating a 32 bit "C" library of TA functions for use with other software"

https://www.aussiestockforums.com/forums/showthread.php?t=29595

There is a post titled "7) Creating a 32 bit Amibroker DLL that links to my library functions created in libtal.a", which might be of some use.

Hope this helps,

Andrew.
 
Top