Better NN EA development - page 84

 

i everyone,i have a strategy that isn't bad in trading,and i want to know how can i add this svm nn to my expert to filtrate the bad signals,any help are really apreciated,thank you

Files:
svm_v01.mq4  50 kb
 

Any help..................

that's my expert test from 300$ to 7000$ in one month,if i can add a NN to filter signals that's gonna to be more good than that...

Files:
 
ziko87:
Any help..................

that's my expert test from 300$ to 7000$ in one month,if i can add a NN to filter signals that's gonna to be more good than that...

Why do you expect that NN will improve your EA?

If you did not base the EA on the NN from the start it will be difficult to incorporate NN - and just t start, you will have to decide to use one of the 100s of theoretical models that you will have to translate to MQL then. Already the choice of NN approach will be difficult enough if you do not use some already

 

but can we use NN like a filter for signals?

 
ziko87:
but can we use NN like a filter for signals?

ziko87

NN is usually used for "prediction". As such ("prediction") I doubt that it can be used as a filter

 

Different pack of bpnn bpnn.zip

Files:
bpnn.gif  28 kb
bpnn.zip  71 kb
 
omelette:

I looked in vain for a contact email address - could you post it? As a paid-up owner, it can only help if as many of us as possible complain...

go here

 

Neural Network

Neural Network: discussion/development threads

  1. Better NN EA development thread with indicators, pdf files and so on.
  2. Better NN EA final thread 
  3. taking NEURAL NETWORKS to the NEXT LEVEL - very interesting thread
  4. Neural Networks thread (good public discussion)
  5. How to build a NN-EA in MT4: usefull thread for developers.
  6. Radial Basis Network (RBN) - As Fit Filter For Price: the thread 

Neural Network: Indicators and systems development

  1. Self-trained MA cross!: development thread for new generation of the indicators
  2. Levenberg-Marquardt algorithm: development thread

Neural Network: EAs

  1. CyberiaTrader EA: discussion thread and EAs' thread.
  2. Self learning expert thread with EAs' files here.
  3. Artificial Intelligence EAs threads: How to "teach" and to use the AI ("neuron") EA thread and Artificial Intelligence  thread
  4. Forex_NN_Expert EA and indicator thread.
  5. SpiNNaker - A Neural Network EA thread

Neural Network: The Books

  1. What to read and where to learn about Machine Learning (10 free books) - the post.

The article

CodeBase

Neural networks made easy (Part 14): Data clustering
Neural networks made easy (Part 14): Data clustering
  • www.mql5.com
It has been more than a year since I published my last article. This is quite a lot time to revise ideas and to develop new approaches. In the new article, I would like to divert from the previously used supervised learning method. This time we will dip into unsupervised learning algorithms. In particular, we will consider one of the clustering algorithms—k-means.
 
There is one thread in Russian forum where the users are talking about it, and it is 2,739 pages on the thread for now (yes, the thread is very popular one).


I am not fully understand about what they are talking about ... something related to this page:
https://cs.stanford.edu/people/karpathy/convnetjs/demo/rldemo.html

..and something about the following ("machine translation" from Russian):

Forum on trading, automated trading systems and testing trading strategies

Machine learning in trading: theory, models, practice and algorithmic trading

mytarmailS , 2022.09.07 07:24

It makes no sense to look at the old model, it does not capture market changes.

I propose to implement as suggested)))
In the sliding window, retrain the model and look at the importance of the features, or simply take some kind of good feature determinant and look at it in the sc. window


Here is an example on a randomly generated sample of 5 features and 1 binary target

for forest and feature selector

X <- matrix (rnorm( 1000 ),ncol = 5 )
Y <- as .factor(sample( 0 : 1 ,nrow(X),replace = T))

head(X)
head(Y)

#install.packages( "randomForest" )
library (randomForest)
rf_imp_mat <- matrix (ncol = ncol(X),nrow = nrow(X))
for (i in 30 :nrow(X)){
  ii <- (i- 29 ):i
  rf <- randomForest(Y[ii]~.,X[ii,],ntree= 100 )
  rf_imp_mat[i,] <- importance(rf)[, 1 ]
}

#install.packages( "FSelectorRcpp" )
library (FSelectorRcpp)
fs_imp_mat <- matrix (ncol = ncol(X),nrow = nrow(X))
for (i in 30 :nrow(X)){
  ii <- (i- 29 ):i
  infg <- information_gain(y = Y[ii],x = as .data.frame(X[ii,]))
  fs_imp_mat[i,] <-  infg$importance
}

par(mfrow=c( 1 , 2 ))
matplot(rf_imp_mat , t= "l" ,lty= 1 ,main= "rf_var_imp" )
matplot(fs_imp_mat , t= "l" ,lty= 1 ,main= "fs_var_imp" )


In R, of course, it is not customary to write in cycles if it is not necessary, but this style confuses beginners, and middle peasants, like me, also confuses ..

but you can write short and so, the code is 3 times less, the result is the same

X <- matrix (rnorm( 1000 ),ncol = 5 )
Y <- as .factor(sample( 0 : 1 ,nrow(X),replace = T))
idx <- embed( 1 :nrow(X),dimension = 30 )[, 30 : 1 ]

library (randomForest)
rf_imp_mat <- t(apply(idx, 1 ,function(i) importance(randomForest(Y[i]~.,X[i,]))[, 1 ]))
library (FSelectorRcpp)
fs_imp_mat <- t(apply(idx,1,function(i) information_gain(y=Y[i],x=as.data.frame(X[i,]))$importance))

par(mfrow=c( 1 , 2 ))
matplot(rf_imp_mat , t= "l" ,lty= 1 ,main= "rf_var_imp" )
matplot(fs_imp_mat , t= "l" ,lty= 1 ,main= "fs_var_imp" )


Also , different feature selectors for every taste, probably 5% of what is in R-ke

 

ONNX and  MQL5 Copilot


The forum

  1. MetaEditor, Open AI and ChatGPT - key forum summary thread
  2. Practical examples: this page

CodeBase

  1. Information about the ONNX model's inputs and outputs - script for MetaTrader 5
  2. Get info about inputs and outputs of onnx-model - script for MetaTrader 5

Documentation

  1. ONNX models in machine learning (MT5)
Reason: