Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

votes: 15
2018.11.20 12:54
RL gmdh.mqh (39.66 KB)view
MT4orders.mqh (76.24 KB)view

The idea and the simplest algorithm are provided in the article "Random decision forest in reinforcement learning"

The library has advanced functionality allowing you to create an unlimited number of "Agents".

In addition, variations of the "Arguments group accounting method" are used

Using the library:

#include <RL gmdh.mqh>
CRLAgents *ag1=new CRLAgents("RlExp1iter",1,100,50,regularize,learn); //created 1 RL agent accepting 100 entries (predictor values) and containing 50 trees

An example of filling input values ​​with normalized close prices:

void calcSignal()
   double arr[];
   for(int i=0;i<ArraySize(ag1.agent);i++)

Training takes place in the tester in one pass with the parameter learn=true. After training, we need to change it to false.

Demonstrating the trained "RL gmdh trader" EA operation on training and test samples.

Translated from Russian by MetaQuotes Software Corp.
Original code:

Candle_Range_Envelop Candle_Range_Envelop

Candle Range Envelop indicator

Mean_Indicator Mean_Indicator

Mean Indicator indicator

Contrarian trade MA Contrarian trade MA

Working by iMA (Moving Average, MA) and OHLC of W1 timeframe

Exp_XFisher_org_v1 Exp_XFisher_org_v1

Exp_XFisher_org_v1 Expert Advisor based on XFisher_org_v1 oscillator signals.