Neural network in the form of a script - page 7

 
liza писал (а) >>

This particular example is what I tried to do. No errors, when "Build All" creates everything except the .dll.

take a dll

there I put the above code

did not enter any parameters ...


but this project in VC++ 6.0 should definitely create a DLL

---

also in versions higher than vc++ 6.0 DLL will be created

older versions will convert the project at the time of opening... to their release

Files:
creadll.rar  2 kb
 
Thank you!!! It worked.
 

http://www.codeproject.com/KB/recipes/aforge_neuro.aspx

http://www.codeproject.com/KB/recipes/Genetic_Algorithm.aspx

http://www.codeproject.com/KB/cs/GA_ANN_XOR.aspx

 

Just as an example.

--- highly discouraged from running it on the real world


Files:
 

Thoughts on the market entry method

As you can see, the neuronics (and any other signal mechanism), constantly generates signals. When we are already in the market the system starts to open several positions. As I see in deals, a take profit and stop loss are included into orders. That is why I suggest to implement something like a signal buffer. And we should enter the market by only one of them (in short, not more than one order).

The advantages. When there is an opposite signal to the one in the buffer for which we have an open order, we do not enter the market at once but wait for closing at Take Profit. Thus, it looks like a "reverse" system (we closed to buy and immediately opened to sell). It's as if we are grasping for a fluctuating market movement and trying to move in sync with it.

It seems to me (though I may be very much mistaken) that the trades of the Expert Advisor with the same name were performed by approximately the same principle. The neural network generates many entry signals, but only one was opened and the entry after the close occurred immediately in the opposite direction.

Second. When open in one direction and signals in the same direction are received, it is a good support for the position by the belief that the opening is correct. Of course, there can be two variants - the signals come when our position is on the plus side or when we are in the red. It is also possible to analyze and change the stop levels (Take Profit for example), or move them to Breakeven.

You should also always consider the stop price of the signal. This is important for opening positions when a Stop Loss is triggered. For example, if we open a buy order with stop-loss at 70 pt and get a sell signal with TakeProfit being higher than the buy stop-loss, in this case we will not be able to enter the sell position.

Anyway, here's a thought.

 
sergeev писал (а) >>

Thoughts on the market entry method

As you can see, the neuronics (and any other signal mechanism), constantly generates signals. When we are already in the market the system starts to open several positions. As I see in deals, a take profit and stop loss are included into orders. That is why I suggest to implement something like a signal buffer. And we should enter the market by only one of them (in short, not more than one order).

The advantages. When there is an opposite signal to the one in the buffer for which we have an open order, we do not enter the market at once but wait for closing at Take Profit. Thus, it looks like a "reverse" system (we closed to buy and immediately opened to sell). It's as if we are grasping for a fluctuating market movement and trying to move in sync with it.

It seems to me (though I may be very much mistaken) that the trades of the Expert Advisor with the same name were performed by approximately the same principle. The neural network generates many entry signals, but only one was opened and the entry after closing was immediately in the opposite direction.

Second. When open in one direction and signals in the same direction are received, it is a good support for the position by the belief that the opening is correct. Of course, there can be two variants - the signals come when our position is on the plus side or when we are in the red. This can also be analyzed and we can change the stop levels (TakeProfit for example), or move it to Breakeven.

You should also always consider the price of the signal stops. This is important for opening positions when a stop loss is triggered. For example, if a buy order is opened with 70 pt stoploop and a sell signal comes in with a takeprofit above the buy stoploop, in this case, we cannot enter the sell position.

So here's a thought.

If you're talking about the script YZ_BETTER_HC_2_2.rar, I assure you it's just an experiment and not complete.

the grid doesn't generate signals - it generates a direction

the inputs are made by a primitive filter

no one is stopping you from adding other indicators-filters

---

Take a short stop there is also a short stop, I was just doing it to visually see the point the grid indicates a possible reversal

---

this grid has

6 inputs give the distance in pips between the mediums like 3-5 5-8 8-13 13-21 21-55

4-50 neurons 1st hidden layer ( number of neurons in both layers to be selected in training)

4-50 neurons 2nd hidden layer

3 neurons out.


------------- buy ---- sell -- flat

output 1 | 0.00x | 0.9xxx | 0.00x

exit 2 | 0.00x | 0.00x | 0.9xx

output 3 | 0.9xx | 0.00x | 0.00x

---

At 2.6 gigahertz, the training on the 7 samples is about 1 to 10 minutes.

in C++ on 7 samples it takes a second to a minute to learn

---

networkers know that 7 samples is too few

 
YuraZ писал (а) >>

If you mean the script YZ_BETTER_HC_2_2.rar, I assure you it is just an experiment, and not a complete one

the grid there doesn't generate signals - it generates direction

the inputs are made by a primitive filter

no one is stopping you from adding other indicators-filters

---

Take a short stop there is also a short stop, I was just doing it to visually see the point the grid indicates a possible reversal

---

This grid has

6 inputs fed pips distances between averages like 3-5 5-8 8-13 13-21 21-55

4-50 neurons 1st hidden layer ( number of neurons in both layers is picked up in training)

4-50 neurons 2nd hidden layer

3 neurons out.


------------- buy ---- sell -- flat

output 1 | 0.00x | 0.9xxx | 0.00x

exit 2 | 0.00x | 0.00x | 0.9xx

output 3 | 0.9xx | 0.00x | 0.00x

---

At 2.6 gigahertz, the training on the 7 samples is about 1 to 10 minutes.

in C++ on 7 samples it takes a second to a minute to learn

---

networkers know that 7 samples is too few


The code is clear to me. I'm talking "about in general".

Even if you attach indicators, and the network will simply filter its signals (or vice versa, the indicator filters the direction given by the network), in any case, the signals will appear at the time of open orders. In this case, you can use the scheme to avoid multiplication of orders.

 
sergeev писал (а) >>

The code is clear to me. I'm talking about "in general".

Even if you attach indicators, and the network will simply filter its signals (or vice versa, the indicator filters the direction given by the network), in any case, the signals will appear at the time of open orders. In this case, to avoid multiplication of orders, we can use the scheme.

In a working system, of course.

---

in the experiment I just want to see how the network works

by filtering I'm just trying to cut out a little bit of it.

 

Consider the following situation:

The NS works, works, studies, studies, and then bang - someone Chubais (with a small letter) cuts off the electricity we need.

And all the work and learning goes down the drain (to Chubais).


The next introduction:

1. Periodically dropping (saving) the data of "learning".

2. In the case, as mentioned above, read this data during initialization of the Expert Advisor.


In this way we won't need to teach the NS again.

Reason: