Discussion of article "Connecting NeuroSolutions Neuronets" - page 6

 
Thank you very much.
 

Does anyone know if there is an example like the one in this article, but in MQL4?

Regards

 
The best auto-trading forum in China, thanks for sharing, selfless contribution, it's a great achievement.
 

I hope someone else is still browsing this section of the forum....

Could you please tell me what could be the problem...

2015.02.09 23:39:15 Core 1 2015.02.01 00:00:00 Cannot load 'D:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.0.1-3000\MQL5\Libraries\NeuroSolutionsAdapter.dll'.

but this library is available at the specified address, I have also multiplied it in some other directories specified in the MQL5 manual.

:( didn't help, who has encountered such behaviour of the tester?

 
Alex_Eliseev:

I hope someone else is still browsing this section of the forum....

Could you please tell me what could be the problem...

2015.02.09 23:39:15 Core 1 2015.02.01 00:00:00 Cannot load 'D:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.0.1-3000\MQL5\Libraries\NeuroSolutionsAdapter.dll'.

but this library is available at the specified address, I have also multiplied it in some other directories specified in the MQL5 manual.

:( didn't help, who has encountered such behaviour of the tester?

It looks like this
Files:
Dll_JPG.jpg  82 kb
 
Alex_Eliseev:

I hope someone else is still browsing this section of the forum....

Could you please tell me what could be the problem...

2015.02.09 23:39:15 Core 1 2015.02.01 00:00:00 Cannot load 'D:\Program Files\Alpari Limited MT5\Tester\Agent-127.0.0.0.1-3000\MQL5\Libraries\NeuroSolutionsAdapter.dll'.

but this library is available at the specified address, I have also multiplied it in some other directories specified in the MQL5 manual.

:( didn't help, who has encountered such behaviour of the tester?

Most likely you have MT5 x64. And libraries are written for x32.
 

like I did without the dll adapter:


ns-unit.mqh

#include "my-net\\Globals.h"

#import "my-net.dll"
int createNetwork(int &pNeuralNetwork, int networkType);
int destroyNetwork(int pNeuralNetwork);
int loadWeights(int pNeuralNetwork, uchar &weightsPathName[]);
int getResponse(int pNeuralNetwork, int exemplars, double &inputData[], double &outputData[]);
int train(int pNeuralNetwork, int epochs, int exemplars, double &inputData[], double &desiredData[], int cvExemplars, double &cvInputData[], double &cvDesiredData[]);
int saveWeights(int pNeuralNetwork, uchar &weightsPathName[]);
#import

int pNeuralNetwork;

bool NSInit()
{
  if (createNetwork(pNeuralNetwork, 1)!=0) return false;
  uchar str[];
  StringToCharArray(BEST_WEIGHTS_PATH_NAME, str);
  if (loadWeights(pNeuralNetwork, str)!=0) return false;
  return true;
}

void NSDeinit()
{
  destroyNetwork(pNeuralNetwork);
}

Where,

my-net.dll - the library that NeuroSolutions creates on your network

Globals.h - the file that is attached to your library after creation (put it in the "my-net" subfolder before compiling the MQL script)


and add this to the main programme:

#include "ns-unit.mqh"
void init()
{
  if (!NSInit())
  {
    Print("NeuroSolutions initiation error.");
    return -1;
  }
} 

void deinit()
{
  NSDeinit();
}


Next, you can successfully use the procedures getResponse to read the network response on a given input and train to retrain the network in real mode.

The first parameter for these procedures will always be the pNeuralNetwork parameter, where the address of the network structure is written.

For the train procedure, the last three parameters can be set to zero if cross-checking is not required.


That's all. Tested - it works :)

Адаптивные торговые системы и их использование в терминале MetaTrader 5
Адаптивные торговые системы и их использование в терминале MetaTrader 5
  • 2010.09.01
  • MetaQuotes Software Corp.
  • www.mql5.com
В статье предложен вариант адаптивной системы, состоящей из множества стратегий, каждая из которых производит свои "виртуальные" торговые операции. Реальная торговля происходит в соответствии с сигналами стратегии, которая на текущий момент является самой прибыльной. За счет использования объектно-ориентированного подхода, классов для работы с данными и торговых классов Стандартной библиотеки, архитектура системы получилась простой и масштабируемой, теперь вы легко сможете создавать и исследовать адаптивные системы, включающие сотни торговых стратегий.
 

I hope someone else is still browsing this section of the forum....

Everything is clear with MQL5, thanks a lot to the author.

But who can help me to connect dll-network to NinjaTrader (C#)?

I'm figuring it out myself, but I can't figure it out. Help, please.

 
Good afternoon! Can you tell me who has managed to launch the robot on MT4?
 
strange i examined this article https://www.mql5.com/en/articles/236  but always him neural network guess to back ,coz him export data first row totay second row yesterday ..... yesterday-1 .... etc  another article is same too https://www.mql5.com/en/articles/830 .... we train the neural network to back but we want guess to forward ....