MQL4 - automated forex trading   /  

Code Base

Code Base  Expert Advisors  NeuroNirvamanEA To post a new code, please log in or register

This Expert Advisor is for
MetaTrader 4
Download MT 4 - 5.5 Mb

Mobile trading!
Buy a license and be mobile in your trading!

Name:
NeuroNirvamanEA
Author: nirvaman (2009.06.09 13:38)
Rating: 10
Downloaded: 4724
Download:
 Sv2.mq4 (3.7 Kb) View
 Laguerre PlusDi.mq4 (2.9 Kb) View
 NeuroNirvaman.mq4 (7.5 Kb) View

Strategy Tester Report
NeuroNirvaman
FXDD-MT4 Demo Server (Build 224)

Symbol EURUSD (Euro vs. United States Dollar)
Period 5 Minutes (M5) 2009.05.22 00:00 - 2009.06.05 22:55 (2009.05.22 - 2009.06.06)
Model Every tick (the most precise method based on all available least timeframes)
Parameters SSP=20; periods=64; distancia=8; x11=130; x12=80; tp1=43; sl1=17; SSP2=2; periods2=74; distancia2=14; x21=140; x22=86; tp2=49; sl2=16; distancia3=13; distancia4=15; periods3=98; periods4=52; x31=196; x32=78; pass=3; lots=0.1; mn=555;

Bars in test 4124 Ticks modelled 161267 Modelling quality n/a







Initial deposit 100000.00



Total net profit 906.33 Gross profit 2637.04 Gross loss -1730.72
Profit factor 1.52 Expected payoff 5.89

Absolute drawdown 4.00 Maximal drawdown 222.24 (0.22%) Relative drawdown 0.22% (222.24)

Total trades 154 Short positions (won %) 89 (37.08%) Long positions (won %) 65 (43.08%)

Profit trades (% of total) 61 (39.61%) Loss trades (% of total) 93 (60.39%)
Largest profit trade 47.00 loss trade -19.72
Average profit trade 43.23 loss trade -18.61
Maximum consecutive wins (profit in money) 4 (176.00) consecutive losses (loss in money) 7 (-127.00)
Maximal consecutive profit (count of wins) 176.00 (4) consecutive loss (count of losses) -127.00 (7)
Average consecutive wins 2 consecutive losses 3







.



Hi all

Neuronirvaman works in EURUSD. I have no tested it on other currencies. Timeframe M5.

Optimization must be done all weekends with a 15 days range of data. Optimization lasts 1 WEEK.

The sttrategy of this EA is to always stop when its in a lossing position. it losses like a 50% of the time but when it wins it wins more that it lose.

yes I have tested it in a real account and it behaves the same it does in demo accounts.

As allways happen with all good EAs this EA backtest is far too optimistic, but if you want to reach the rooft you have to aim the stars.

if you ever make money with this EA please give some of your fortune to the more
needed of my country. Thats fair in exchange to what I am giving to you.

here you can do your donations.
https://pagos.conexioncolombia.com/home.aspx

I believe in good things happen to you when you do good things to other people.

just try it. ;-)


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

for you to work with this EA, first you have to undestand some things


1) forget about indicators and rules based on static values. target and stoplosses must always change depending on market conditions. it only can work when you constantly optimize the EA (all weekends).

2) if you are lazy and dont optimize it ALL WEEKENDS you will lose money. optimization takes like 1 day.

3) if you are so lazy that you dont want to move a finger and earn money, you always can auto trade this using my signals exposed in fxdd, alphary, OLD, Fxcm, goforex, Avafx, Wallstreet, Monex investindo Futures, FXCBS, ForexYard, Bullbroker. those brokers have autotrader like the following http://fxcm.fx-performance.com/Performance.aspx#PagePerformance my system shows with the name "matadorfx".

I will start puting my signals today 2009/06/08. Past performance correspond to other old system I used.


-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Sv2.mq4 goes in Indicators folder

Laguerre PlusDi.mq4 goes in Indicators folder

NeuroNirvaman.ex4 goes in Experts folder

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Optimization

to train the network you must do the following

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Stage 1. Teaching the perceptron responsible for long positions:

Set the value 1 (according to the stage number) for the input "pass".
Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage.

Check the inputs for optimization:

ssp, periods, distancia, x11, x12, tp1, sl1. the parameters for start step stop are in the setting file i am attaching

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Stage 2. Teaching the perceptron responsible for short positions:

Set the value 2 (according to the stage number) for the input "pass".
Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage.

Check the inputs for optimization:

ssp2, periods2, distancia, x21, x22, tp2, sl2. The parameters for start step stop are in the setting file i am attaching

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Stage 3. Teaching the perceptron responsible for type of market:

Set the value 3 (according to the stage number) for the input "pass".
Uncheck the inputs checked for optimization in the previous stage. Just in case, save in a file the inputs obtained at the previous stage.

Check the inputs for optimization:

ssp3, periods3, distancia3, x31, x32, tp3, sl3. The parameters for start step stop are in the setting file i am attaching

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

That's all, the neural network has been taught. the "pass" value must remain in "pass=3" for using the EA in a chart. this are the final settings you must save


here goes the .set file. open the notpad and copy and paste the following into that notepad. the save it as neuronirvaman.set



SSP=20.00000000
SSP,F=0
SSP,1=0.00000000
SSP,2=2.00000000
SSP,3=100.00000000
periods=64.00000000
periods,F=0
periods,1=0.00000000
periods,2=2.00000000
periods,3=100.00000000
distancia=8.00000000
distancia,F=0
distancia,1=0.00000000
distancia,2=2.00000000
distancia,3=50.00000000
x11=130
x11,F=0
x11,1=0
x11,2=2
x11,3=200
x12=80
x12,F=0
x12,1=0
x12,2=2
x12,3=200
tp1=43.00000000
tp1,F=0
tp1,1=10.00000000
tp1,2=1.00000000
tp1,3=50.00000000
sl1=17.00000000
sl1,F=0
sl1,1=10.00000000
sl1,2=1.00000000
sl1,3=25.00000000
SSP2=2.00000000
SSP2,F=0
SSP2,1=0.00000000
SSP2,2=2.00000000
SSP2,3=100.00000000
periods2=74.00000000
periods2,F=0
periods2,1=0.00000000
periods2,2=2.00000000
periods2,3=100.00000000
distancia2=14.00000000
distancia2,F=0
distancia2,1=0.00000000
distancia2,2=2.00000000
distancia2,3=50.00000000
x21=140
x21,F=0
x21,1=0
x21,2=2
x21,3=200
x22=86
x22,F=0
x22,1=0
x22,2=2
x22,3=200
tp2=49.00000000
tp2,F=0
tp2,1=10.00000000
tp2,2=1.00000000
tp2,3=50.00000000
sl2=16.00000000
sl2,F=0
sl2,1=10.00000000
sl2,2=1.00000000
sl2,3=25.00000000
distancia3=13.00000000
distancia3,F=1
distancia3,1=1.00000000
distancia3,2=2.00000000
distancia3,3=50.00000000
distancia4=15.00000000
distancia4,F=1
distancia4,1=1.00000000
distancia4,2=2.00000000
distancia4,3=50.00000000
periods3=98.00000000
periods3,F=1
periods3,1=0.00000000
periods3,2=2.00000000
periods3,3=100.00000000
periods4=52.00000000
periods4,F=1
periods4,1=0.00000000
periods4,2=2.00000000
periods4,3=100.00000000
x31=196
x31,F=1
x31,1=0
x31,2=2
x31,3=200
x32=78
x32,F=1
x32,1=0
x32,2=2
x32,3=200
pass=3
pass,F=0
pass,1=4
pass,2=0
pass,3=0
lots=0.10000000
lots,F=0
lots,1=0.10000000
lots,2=0.00000000
lots,3=0.00000000
mn=555
mn,F=0
mn,1=555
mn,2=0
mn,3=0







26 comments: 1 2 3   To post a new comment, please log in or register

Sv2 is crap, it uses FORWARD values... not hard to figure when to buy/sell when you look at the future !!



14.11.2009 23:22 brainstom

Hi,


I noticed something rather strange with this EA (maybe with all EAs actually)

I trained this EA over the data of two weeks, then let it trade for a week on a demo account. The result was satisfying.


then I retrained the EA over the two same weeks. Then I ran the EA in the tester over the same week I just ran for "real" in th edemo account. The result was horrible.


Logically, if the historical data and the tester are accurate, the trades over the week in real-time, and the trades over that same week in the tester should be similar. They were completely different. The parameters for the EA, computed over the same 2 weeks were very different too.

I ran the tester in the tick mode, most accurate, for all training and testing.


So, beware, I think the historical data and or the tester can be completely wrong. Which BTW makes sense as the historical data files are very small, so obviously MT4 does not store real tick data.

12.11.2009 16:30 brainstom

Hi All,

for the step 3 you need to select distancia3 through x32 and deselect any other.

The training method is simple: you select phase 1 and corresponding parameters. Once the optimization is finished, sort results by profit and double click the line with the best results. This will autoload the settings. Next you deselect current parameter set and go to phase two. So one. Be sure you save settings at each step - it's easy to get lost.

ALX

17.08.2009 20:13 alxalx

Hi nirvaman

You keep saying you corrected the step 3 instructions and advice to read it over.

Where is the corrected step 3 instructions?

ALX



nirvaman wrote:

I have corrected a problem with the instructions to train the neural network (stage 3). please read it again. Someone asked if the training of this neural network uses the backtest optimization to do this. the answer is YES. we use the backtester to trian the neural network. thwe settings you obtain in the optimization is the trained neural network







nirvaman wrote:

I have corrected a problem with the instructions to train the neural network (stage 3). please read it again. Someone asked if the training of this neural network uses the backtest optimization to do this. the answer is YES. we use the backtester to trian the neural network. thwe settings you obtain in the optimization is the trained neural network








16.08.2009 05:47 alxalx

Hi.

I'm going to perform 3rd optimization, but there is no tracks about ssp3, distancia3, tp3, sl3.

On the other hand, in your set you put period4 and distancia4.

What about ssp3, distancia3, tp3, sl3?

:-D

nirvaman wrote:
effedielle wrote:
nirvaman wrote:
effedielle wrote:
nirvaman wrote:
whit32457 wrote:
nirvaman wrote:
Azb wrote:

nirvaman, are you sure you posted a complete version? and how is such a simple ea supposed to learn something cool based on an optimization of only a week or two ago? are you serious to call this a neural netowrk? this program can react based on 14 days movement of market, but will never see actions which happened years ago. it cannot truly learn anything useful. more over in stage 3 optimization the variables you mention are missing!!! so why do you post incomplete code? on the forum you posted your strategy is not too profitable overall anyway. i think it behaves more or less randomly. for example tell me, why default values in the code differ from paramater values you are posting here in the parameter section? here is the sample:

(

Parameters SSP=20; periods=64; distancia=8; x11=130; x12=80; tp1=43; sl1=17; SSP2=2; periods2=74; distancia2=14; x21=140; x22=86; tp2=49; sl2=16; distancia3=13; distancia4=15; periods3=98; periods4=52; x31=196; x32=78; pass=3; lots=0.1; mn=555;

)

why are these values different from the default ones in the code itself? does it even matter if i pick some custom initial values myself? you need to explain more in detail.

the defaults are the defaults. this EA need the settings obtained in your own optimization. my goal is not to convince anyone, just tio give something to start with. this can work much better with some improvements. this is a counter trend EA

Azb, I too was confused about this until I re read it a couple times. It looks like the optimization must be run 4 times, starting with the values given, then each successive run, index down the list for each parameter. I haven't had the time to do it 4 times (yet) but I'm going to give it a shot and see how it goes on a "play money" account.

Whit

thats the correct interpretation. you must run optimization 4 times. each time you have to change variable "pass". after each optimization you must use the settings in the next optimization.



Hello guys!
Congratulations to Nirvaman for code: a curriculum in all respect. And above all, congratulations for the idea to use the first earnings to charity. I agree 1000%
I regret doing the same question for the umpteenth time, but I do not have clear steps for the optimization.

3 steps are described very clearly:

1) long positions optimization

2) short positions optimization

3)market optimization.

But...
In response you said that the optimizations are all 4th. But you also said that the variable step must be left at "3" in order to use the EA.
What are the variables to be set for the fourth optimization?
To use the algorithm as the EA how have I to set the variable "step"?
I am very confused ...

sorry. my mistake. you are right. there is only 3 steps and in must remain in the last step for using is after optimization. Pass=3. you must let it there after optimization. there is not 4th step

One more thing: I imagine that for brokers who use 5-digit we should multiplied by 10 the values of TP and SL . Right?

See ya!
;-)

yes. you must adjust al those things


17.07.2009 21:04 effedielle
effedielle wrote:
nirvaman wrote:
effedielle wrote:
nirvaman wrote:
whit32457 wrote:
nirvaman wrote:
Azb wrote:

nirvaman, are you sure you posted a complete version? and how is such a simple ea supposed to learn something cool based on an optimization of only a week or two ago? are you serious to call this a neural netowrk? this program can react based on 14 days movement of market, but will never see actions which happened years ago. it cannot truly learn anything useful. more over in stage 3 optimization the variables you mention are missing!!! so why do you post incomplete code? on the forum you posted your strategy is not too profitable overall anyway. i think it behaves more or less randomly. for example tell me, why default values in the code differ from paramater values you are posting here in the parameter section? here is the sample:

(

Parameters SSP=20; periods=64; distancia=8; x11=130; x12=80; tp1=43; sl1=17; SSP2=2; periods2=74; distancia2=14; x21=140; x22=86; tp2=49; sl2=16; distancia3=13; distancia4=15; periods3=98; periods4=52; x31=196; x32=78; pass=3; lots=0.1; mn=555;

)

why are these values different from the default ones in the code itself? does it even matter if i pick some custom initial values myself? you need to explain more in detail.

the defaults are the defaults. this EA need the settings obtained in your own optimization. my goal is not to convince anyone, just tio give something to start with. this can work much better with some improvements. this is a counter trend EA

Azb, I too was confused about this until I re read it a couple times. It looks like the optimization must be run 4 times, starting with the values given, then each successive run, index down the list for each parameter. I haven't had the time to do it 4 times (yet) but I'm going to give it a shot and see how it goes on a "play money" account.

Whit

thats the correct interpretation. you must run optimization 4 times. each time you have to change variable "pass". after each optimization you must use the settings in the next optimization.



Hello guys!
Congratulations to Nirvaman for code: a curriculum in all respect. And above all, congratulations for the idea to use the first earnings to charity. I agree 1000%
I regret doing the same question for the umpteenth time, but I do not have clear steps for the optimization.

3 steps are described very clearly:

1) long positions optimization

2) short positions optimization

3)market optimization.

But...
In response you said that the optimizations are all 4th. But you also said that the variable step must be left at "3" in order to use the EA.
What are the variables to be set for the fourth optimization?
To use the algorithm as the EA how have I to set the variable "step"?
I am very confused ...




sorry. my mistake. you are right. there is only 3 steps and in must remain in the last step for using is after optimization. Pass=3. you must let it there after optimization. there is not 4th step

One more thing: I imagine that for brokers who use 5-digit we should multiplied by 10 the values of TP and SL . Right?

See ya!
;-)

yes. you must adjust al those things


17.07.2009 01:59 nirvaman
nirvaman wrote:
effedielle wrote:
nirvaman wrote:
whit32457 wrote:
nirvaman wrote:
Azb wrote:

nirvaman, are you sure you posted a complete version? and how is such a simple ea supposed to learn something cool based on an optimization of only a week or two ago? are you serious to call this a neural netowrk? this program can react based on 14 days movement of market, but will never see actions which happened years ago. it cannot truly learn anything useful. more over in stage 3 optimization the variables you mention are missing!!! so why do you post incomplete code? on the forum you posted your strategy is not too profitable overall anyway. i think it behaves more or less randomly. for example tell me, why default values in the code differ from paramater values you are posting here in the parameter section? here is the sample:

(

Parameters SSP=20; periods=64; distancia=8; x11=130; x12=80; tp1=43; sl1=17; SSP2=2; periods2=74; distancia2=14; x21=140; x22=86; tp2=49; sl2=16; distancia3=13; distancia4=15; periods3=98; periods4=52; x31=196; x32=78; pass=3; lots=0.1; mn=555;

)

why are these values different from the default ones in the code itself? does it even matter if i pick some custom initial values myself? you need to explain more in detail.

the defaults are the defaults. this EA need the settings obtained in your own optimization. my goal is not to convince anyone, just tio give something to start with. this can work much better with some improvements. this is a counter trend EA

Azb, I too was confused about this until I re read it a couple times. It looks like the optimization must be run 4 times, starting with the values given, then each successive run, index down the list for each parameter. I haven't had the time to do it 4 times (yet) but I'm going to give it a shot and see how it goes on a "play money" account.

Whit

thats the correct interpretation. you must run optimization 4 times. each time you have to change variable "pass". after each optimization you must use the settings in the next optimization.



Hello guys!
Congratulations to Nirvaman for code: a curriculum in all respect. And above all, congratulations for the idea to use the first earnings to charity. I agree 1000%
I regret doing the same question for the umpteenth time, but I do not have clear steps for the optimization.

3 steps are described very clearly:

1) long positions optimization

2) short positions optimization

3)market optimization.

But...
In response you said that the optimizations are all 4th. But you also said that the variable step must be left at "3" in order to use the EA.
What are the variables to be set for the fourth optimization?
To use the algorithm as the EA how have I to set the variable "step"?
I am very confused ...

sorry. my mistake. you are right. there is only 3 steps and in must remain in the last step for using is after optimization. Pass=3. you must let it there after optimization. there is not 4th step

One more thing: I imagine that for brokers who use 5-digit we should multiplied by 10 the values of TP and SL . Right?

See ya!
;-)

17.07.2009 00:57 effedielle
effedielle wrote:
nirvaman wrote:
whit32457 wrote:
nirvaman wrote:
Azb wrote:

nirvaman, are you sure you posted a complete version? and how is such a simple ea supposed to learn something cool based on an optimization of only a week or two ago? are you serious to call this a neural netowrk? this program can react based on 14 days movement of market, but will never see actions which happened years ago. it cannot truly learn anything useful. more over in stage 3 optimization the variables you mention are missing!!! so why do you post incomplete code? on the forum you posted your strategy is not too profitable overall anyway. i think it behaves more or less randomly. for example tell me, why default values in the code differ from paramater values you are posting here in the parameter section? here is the sample:

(

Parameters SSP=20; periods=64; distancia=8; x11=130; x12=80; tp1=43; sl1=17; SSP2=2; periods2=74; distancia2=14; x21=140; x22=86; tp2=49; sl2=16; distancia3=13; distancia4=15; periods3=98; periods4=52; x31=196; x32=78; pass=3; lots=0.1; mn=555;

)

why are these values different from the default ones in the code itself? does it even matter if i pick some custom initial values myself? you need to explain more in detail.

the defaults are the defaults. this EA need the settings obtained in your own optimization. my goal is not to convince anyone, just tio give something to start with. this can work much better with some improvements. this is a counter trend EA

Azb, I too was confused about this until I re read it a couple times. It looks like the optimization must be run 4 times, starting with the values given, then each successive run, index down the list for each parameter. I haven't had the time to do it 4 times (yet) but I'm going to give it a shot and see how it goes on a "play money" account.

Whit

thats the correct interpretation. you must run optimization 4 times. each time you have to change variable "pass". after each optimization you must use the settings in the next optimization.




Hello guys!
Congratulations to Nirvaman for code: a curriculum in all respect. And above all, congratulations for the idea to use the first earnings to charity. I agree 1000%
I regret doing the same question for the umpteenth time, but I do not have clear steps for the optimization.

3 steps are described very clearly:

1) long positions optimization

2) short positions optimization

3)market optimization.

But...
In response you said that the optimizations are all 4th. But you also said that the variable step must be left at "3" in order to use the EA.
What are the variables to be set for the fourth optimization?
To use the algorithm as the EA how have I to set the variable "step"?
I am very confused ...




sorry. my mistake. you are right. there is only 3 steps and in must remain in the last step for using is after optimization. Pass=3. you must let it there after optimization. there is not 4th step


16.07.2009 22:34 nirvaman
nirvaman wrote:
whit32457 wrote:
nirvaman wrote:
Azb wrote:

nirvaman, are you sure you posted a complete version? and how is such a simple ea supposed to learn something cool based on an optimization of only a week or two ago? are you serious to call this a neural netowrk? this program can react based on 14 days movement of market, but will never see actions which happened years ago. it cannot truly learn anything useful. more over in stage 3 optimization the variables you mention are missing!!! so why do you post incomplete code? on the forum you posted your strategy is not too profitable overall anyway. i think it behaves more or less randomly. for example tell me, why default values in the code differ from paramater values you are posting here in the parameter section? here is the sample:

(

Parameters SSP=20; periods=64; distancia=8; x11=130; x12=80; tp1=43; sl1=17; SSP2=2; periods2=74; distancia2=14; x21=140; x22=86; tp2=49; sl2=16; distancia3=13; distancia4=15; periods3=98; periods4=52; x31=196; x32=78; pass=3; lots=0.1; mn=555;

)

why are these values different from the default ones in the code itself? does it even matter if i pick some custom initial values myself? you need to explain more in detail.

the defaults are the defaults. this EA need the settings obtained in your own optimization. my goal is not to convince anyone, just tio give something to start with. this can work much better with some improvements. this is a counter trend EA

Azb, I too was confused about this until I re read it a couple times. It looks like the optimization must be run 4 times, starting with the values given, then each successive run, index down the list for each parameter. I haven't had the time to do it 4 times (yet) but I'm going to give it a shot and see how it goes on a "play money" account.

Whit

thats the correct interpretation. you must run optimization 4 times. each time you have to change variable "pass". after each optimization you must use the settings in the next optimization.



Hello guys!
Congratulations to Nirvaman for code: a curriculum in all respect. And above all, congratulations for the idea to use the first earnings to charity. I agree 1000%
I regret doing the same question for the umpteenth time, but I do not have clear steps for the optimization.

3 steps are described very clearly:

1) long positions optimization

2) short positions optimization

3)market optimization.

But...
In response you said that the optimizations are all 4th. But you also said that the variable step must be left at "3" in order to use the EA.
What are the variables to be set for the fourth optimization?
To use the algorithm as the EA how have I to set the variable "step"?
I am very confused ...




16.07.2009 19:30 effedielle
whit32457 wrote:
nirvaman wrote:
Azb wrote:

nirvaman, are you sure you posted a complete version? and how is such a simple ea supposed to learn something cool based on an optimization of only a week or two ago? are you serious to call this a neural netowrk? this program can react based on 14 days movement of market, but will never see actions which happened years ago. it cannot truly learn anything useful. more over in stage 3 optimization the variables you mention are missing!!! so why do you post incomplete code? on the forum you posted your strategy is not too profitable overall anyway. i think it behaves more or less randomly. for example tell me, why default values in the code differ from paramater values you are posting here in the parameter section? here is the sample:

(

Parameters SSP=20; periods=64; distancia=8; x11=130; x12=80; tp1=43; sl1=17; SSP2=2; periods2=74; distancia2=14; x21=140; x22=86; tp2=49; sl2=16; distancia3=13; distancia4=15; periods3=98; periods4=52; x31=196; x32=78; pass=3; lots=0.1; mn=555;

)

why are these values different from the default ones in the code itself? does it even matter if i pick some custom initial values myself? you need to explain more in detail.

the defaults are the defaults. this EA need the settings obtained in your own optimization. my goal is not to convince anyone, just tio give something to start with. this can work much better with some improvements. this is a counter trend EA

Azb, I too was confused about this until I re read it a couple times. It looks like the optimization must be run 4 times, starting with the values given, then each successive run, index down the list for each parameter. I haven't had the time to do it 4 times (yet) but I'm going to give it a shot and see how it goes on a "play money" account.

Whit

thats the correct interpretation. you must run optimization 4 times. each time you have to change variable "pass". after each optimization you must use the settings in the next optimization.


24.06.2009 17:11 nirvaman