Question on DLL ......

 

Can you guys tell me what can be transferred to the DLL and what can't?

Is it possible to use predefined variables in the DLL ????

 
Anything is possible there.
 
VOLDEMAR:

Can you guys tell me what can be transferred to the DLL and what can't?

Is it possible to use predefined variables in the DLL ????

Don't bother, nobody needs your owl!

Just make a buck with it, and don't forget to post on "Cool Peppers"!

 
Roman.:

Don't bother, nobody needs your owls!

You can make money with it, and don't forget to post it in "Cool Peppers"!



Thank you !!! The question was different ...

In the tester, an EA with a dll will also work as well as on the demo/real ???

 
VOLDEMAR:


Thank you !!! The question was different ...

In the tester the EA with dll will work as well as on demo/real ???


In the Strategy Tester the Expert Advisor with dll will work. To the question "as well" - it depends directly on how it is sharpened for real - handling requotes and other possible errors and actions of your EA...
 
You can call a procedure/function attached to a dll from an EA, just like from another program, if you first tell the EA that this dll is attached to it. What you put in your dll will work for you.
 
Roman.:

In the Strategy Tester an EA with dll will work. To the question "also" - it depends directly on how you sharpen it for real - processing requotes and other possible errors and actions of your company ...
Expert Advisor code
extern int  _A = 50;
extern int  _B = 80;

#import "proba.dll"
int Funkciya(int,int);
#import

int start()
  {
RefreshRates();
Comment(Funkciya(_A,_B));
   return(0);
  }

Dll code

// proba.cpp: определяет экспортированные функции для приложения DLL.
//

#include "stdafx.h"
#define MT4_EXPFUNC __declspec(dllexport)

//------------------------------------------------------------------------------------
//                        Код советника
//------------------------------------------------------------------------------------
MT4_EXPFUNC int __stdcall Funkciya(int a,int b)
{


int c=a+b;


return(c);}

The Expert Advisor should display the sum of a+b on the chart

but it does not display .... I try to make a dll in VS 2010

Do you know why no result appears on the chart?

 
Try looking at the value of the "c" variable in the dll before retouring with a regular MessageBox().
 

Try also setting the import using a header file

 
What does it say in the log? Where did you get the sample project? Surely there is no DEF file.
 
Zhunko:
What does it say in the log? Where did you get the sample project? Surely there is no DEF file.


Yes def no I never found how to create it ... in the log says 2012.07.28 13:32:43 2012.02.01 00:00 proba EURUSD,H1: cannot call function 'Funkciya' from dll 'proba.dll'(error 127)