Build Neural Network Indicator in MT4 using Neuroshell

You can easily export your data in a text file or csv, and import them in Heuristiclab.

I still havent found the optimal trading solution, so not full integration yet.

I’m testing regression and classification.

For regression problem I’ve found Formulize to perform much better than the GP provide in Heuristiclab.

...still work in progress :)
 
How can I implement profit/loss, maxDD, profit factor etc ? So instead of trying to maximize the r square , I can maximaze the profit and performance of the expert.
 
24 free algorithms to play with... :cheesy:

Heuristiclab:
UsersFeatures

Heuristiclab download:
Download

I've been play with Random Forest Classification.... impressive! (y)

Do you have to have MT4 to play with heuristiclab ?
I haven't got MT4 and when I download heuristiclab I get a page of coding only.
Can you help ?
 

Attachments

  • heuristiclab.PNG
    heuristiclab.PNG
    148.7 KB · Views: 447
You clicked the wrong file!

This is the config file!
HeuristicLab 3.3.exe.config

This is the correct one
HeuristicLab 3.3.exe

Check the extension of your file... must be an .exe
 
24 free algorithms to play with... :cheesy:

Heuristiclab:
UsersFeatures

Heuristiclab download:
Download

I've been play with Random Forest Classification.... impressive! (y)

Hi.

Heuristiclab looks impressive. Unfortunately it is poor documented. I'm looking for guide how to set up HL to find formulas like Eureqa II (Formulize) and other documentations on HL.
 
The technology behind Eureqa is GEP “Gene Expression Programming”. It was introduced in 1999. Gepsoft has a commercial version of it but it has also been implemented in several libraries:

GEP: Downloads

C#
More AI...(GEP) Gene Expression Programming in C# and .NET

C++
Gene Expression Programming

and certainly many others...

Ward System has a commercial version too that is actually used in trading called "ChaosHunter".


GEP is great at finding past dependencies. You can even design neural nets:
Paper: Designing Neural Networks Using Gene Expression Programming - comp.ai.neural-nets | Computer Group


However, like any other (over?) fitting algorithm, finding dependable predictive relationships is not trivial… I don't think we can summarize markets with analytical expressions as we do with electrons which don't have feelings.
 
Greetings!

Where are the postings of sucessfull trading results with Neuroshell etc.. ??
Are you just doing basic research ? Or what . :)

Can anyone clarify how to use and apply neuroshell with mt4 profitable in forex ?
Can you please post your files and indicators and trading results too !

That would be very nice, I guess.

Sorry, English is not my first language, but I am trying my best.

so long
patrick
 
Wow..wonderful progress guys..now we get Heuristiclab..DTReg.. so many things will come out.. sure

I just found a good method to achieve a better things on gathering all ideas...its very simple, i.e. using iMindmap (Tony Buzan). iMindmap used to formulate all the working steps, even more details idea can be easily identified (of course with creativity). I am learning to apply it for most activities.

Here is a sample implementation how to to find a simple formula using chaos hunter for a complex indicator, such as Gauss Filter, Kalman Filter, etc.

Take the sample code for Gaussian Filter from Gaussian Filter - MQL4 Code Base

Using CH, I could found a better and more simple equation made from OHLC data. So far I can get shorter mq4 code to get a almost similar indicator values. The original code having about 178 lines while using CH formula only 59 lines.

See the chart comparison. It look nice to combine with wmm-Gaussianfilter to generate trade signal (probably ;) ).
 

Attachments

  • Simplify Indicator Equation - iMindmap.png
    Simplify Indicator Equation - iMindmap.png
    75.7 KB · Views: 867
  • Code compare.png
    Code compare.png
    70.2 KB · Views: 603
  • Compare GF original - CH equation.png
    Compare GF original - CH equation.png
    36.3 KB · Views: 844
  • Combine GF with wmmmGF.png
    Combine GF with wmmmGF.png
    31.5 KB · Views: 613
  • aaGF0ax.png
    aaGF0ax.png
    154 KB · Views: 661
Wow..wonderful progress guys..now we get Heuristiclab..DTReg.. so many things will come out.. sure

I just found a good method to achieve a better things on gathering all ideas...its very simple, i.e. using iMindmap (Tony Buzan). iMindmap used to formulate all the working steps, even more details idea can be easily identified (of course with creativity). I am learning to apply it for most activities.

Here is a sample implementation how to to find a simple formula using chaos hunter for a complex indicator, such as Gauss Filter, Kalman Filter, etc.

Take the sample code for Gaussian Filter from Gaussian Filter - MQL4 Code Base

Using CH, I could found a better and more simple equation made from OHLC data. So far I can get shorter mq4 code to get a almost similar indicator values. The original code having about 178 lines while using CH formula only 59 lines.

See the chart comparison. It look nice to combine with wmm-Gaussianfilter to generate trade signal (probably ;) ).

Hi. Is CH ditributive or demo aviable for download?
 
Arryex,

In one of the pictures it says '' using so many variables ---more lagging time in processing--- complex equation---easily fail during mql preparation----

What do you mean by variables?Do you mean indicators?

I mean, I am planning to use 4 indicators for signalling and rest will be performance metrics like sharpe ratio ,mar ratio ,max dradown(about 10 metrics) and indicators for determinig the market state like pips value of zig zag legs , percent value of zigzag legs(about 7 indicators)
 
Hi Tovim,

If you check for the mq4 code Gaussian Filter - MQL4 Code Base, then you will have these variables defined along the code:
====
double fil[];
double fil.u[];
double fil.d[];
double fil.f.u[];
double fil.f.d[];
double pi = 3.1415926535;

extern int FilterPeriod=12;
double fil.alfa;
double getAlfa(int p){
double w = 2*pi/p;
double beta = (1 - MathCos(w))/(MathPow(1.414,2.0/3) - 1);
double alfa = -beta + MathSqrt(beta*beta + 2*beta);
return (alfa);
}

double s2=fil[i+2]-fil[i+1];
double s1=fil[i+1]-fil;
double ret = MathPow(alfa,4)*price + 4*(1-alfa)*arr[i+1] - 6*MathPow(1-alfa,2)*arr[i+2] + 4*MathPow(1-alfa,3)*arr[i+3] - MathPow(1-alfa,4)*arr[i+4];
====

Then you have a complex equation to define your indicator:
=====
for(int i=Bars-counted_bars-1;i>=0;i--){
fil=GSMOOTH(Close[i+1],fil,fil.alfa,i);
if(fil>fil[i+1]){
fil.u=fil;
fil.u[i+1]=fil[i+1];
}
if(fil<fil[i+1]){
fil.d=fil;
fil.d[i+1]=fil[i+1];
}
double s2=fil[i+2]-fil[i+1];
double s1=fil[i+1]-fil;
if(s1<s2){
fil.f.u=fil;
}
if(s1>s2){
fil.f.d=fil;
}
====

Compare to the indicator resulted from CH, I have only a single equation, such as (not the actual equation but in the same form):
Fil = iMA(NULL,0,13,8,MODE_EMA,PRICE_CLOSE,i)-(iRSI(NULL,0,14,PRICE_CLOSE,i)+ iRSI(NULL,0,14,PRICE_CLOSE,i))/3;
===
Yes you are right, the variables can be considered as indicators which form the final indicator.

Seems you are using NSDT, in your case, if you have a neural indicator came from several indicators (let say originally "Predicted 5 bars percent change" made from 10 indicators). If you can export the indicator data into csv (include Open, High, Low, Close) then run CH to get new equation formed directly from OHLC data. If the new CH indicator almost same value as the original one, then I prefer to use this new indicator instead of using original 10 indicators as an input. This will produce a simple and faster processing.

I am not sure if above explanation fits with your question.
 
Thanks Arry ,

I am using Chaos Hunter.

This is what happens when you are a novice programmer; you are wandering around in various web sites and papers about system developing and performance metrics, at the end of day you dont know where to start from and become a pessimistic and you have sore head :) , next day you do same ,following your tail!

Ok ,I will be more clear :
Here in this link: Neural Networks in Trading: Reproducible NN Money Management with Statistically Relevant Results, a Great Step Forward | Mechanical Forex ,the author claims that he created money management techniques with neural network.He is using the trade history in order to predict future will be a winner or a loser.He says neural network money management which he claims self-adaptive; improving any of his systems greatly by analyzing how past profit/loss sequences have happened.He is claiming to forecast the losing and winning trades at 70% accuracy and he can fit NN money managment system into any of his indicators.

Also Krzysztof mentioned that his systems' profit factor raised from 1.5 to 4.54 by using equity curve display indicator.How did the equity curve display indicator raised the performance? By money management ?I did not understand it clearly.Thanks.
 
Thanks Tovim for the link..quite good idea..

I am trying to digging the idea:
- Assume we have a trading strategy based on an indicator (using NSDT we can get the optimum parameter of input indicators).
- We create a record from the trade history, lot size, the percentage of winner/looser, equity balance for each trade
- Train NN with target output to optimize lot size in order to maximize the final equity
I will study further...let start ..
 
Arryex,

In one of the pictures it says '' using so many variables ---more lagging time in processing--- complex equation---easily fail during mql preparation----

What do you mean by variables?Do you mean indicators?

I mean, I am planning to use 4 indicators for signalling and rest will be performance metrics like sharpe ratio ,mar ratio ,max dradown(about 10 metrics) and indicators for determinig the market state like pips value of zig zag legs , percent value of zigzag legs(about 7 indicators)

Hi.

I'm doing almost the same.
1) I wrote ZigZag which draws legs when they grater than defined pips. It helps to normalize signal for NN -1(down trend),-0.5(down trend changed to up),0.5(up trend changed to down),1(up trend).
2) I calculate percent of change for evry bar Open-Close of all aviable currencyes.
3) Uploading this data to MySql DB
4) Processing data.

Tovim, do you seccess with ZigZag?
 

Attachments

  • zz_t2w.JPG
    zz_t2w.JPG
    34.1 KB · Views: 547
Hi.

I'm doing almost the same.
1) I wrote ZigZag which draws legs when they grater than defined pips. It helps to normalize signal for NN -1(down trend),-0.5(down trend changed to up),0.5(up trend changed to down),1(up trend).
2) I calculate percent of change for evry bar Open-Close of all aviable currencyes.
3) Uploading this data to MySql DB
4) Processing data.

Tovim, do you seccess with ZigZag?

Graff,

I do similar analysis with zigzag,but I do not use the zigzag for signalling purpose.I use volatility ratio for number two which is freely available in the forums.Here is some of my thoughts:

John Last mentioned about Turtles and market state analysis:According to Turtles John Last said there are 4 state of markets 1)Stable and quiet 2)Stable and volatile 3)Trending and quiet 4)Trending and volatile.Also markets can be in this four state and it can be oversold or overbought.

So zigzag can be helpful along with other tools to analyse this 4 market state with neural network or genetic programming.
 
Top