Build Neural Network Indicator in MT4 using Neuroshell

Hi mr. future

Do you use stochastic oscillator also in your kohonen network as well as in PNN?

Are the inputs stochastic values it selves or using different with their lags?
 
OOps,

Sorry, I wrote the question while you are writing your last posting. Sorry
 
Here's another indicator on the network with the overall regression. Predicts MA. Parameter Predict - to predict how many bars, blue - AI itself, the red line - a prediction. Installation Instructions - on the first page.
Nice work. :clap:
Have you tried making an EA with the NS2 DLL? I have had difficulty with any DLL that requires static memory allocated in the DLL, because the Strategy tester seems to call the DLL with every tick, then the DLL must restart, overwriting the memory or something, because it gives the wrong answers.(My Dll's with static memory allocated in the MT4 code work just fine. Also the problem with static memory allocation does not occur in indicators.).:confused:
I wonder if the NS2 DLL somehow avoids this problem, or if I have been doing something wrong.
 
Hi Mr. Future,

The KOH indicator can be displayed (see bottom chart), but PNN can not, it use KOH_1 indicator. Is it KOH and KOH_1 using the similar?

Thanks
 

Attachments

  • Koh.png
    Koh.png
    22.6 KB · Views: 619
I do not use the actual values of the indicators. I use the differentials between their previous values (lag).
 
Nice work. :clap:
Have you tried making an EA with the NS2 DLL? I have had difficulty with any DLL that requires static memory allocated in the DLL, because the Strategy tester seems to call the DLL with every tick, then the DLL must restart, overwriting the memory or something, because it gives the wrong answers.(My Dll's with static memory allocated in the MT4 code work just fine. Also the problem with static memory allocation does not occur in indicators.).:confused:
I wonder if the NS2 DLL somehow avoids this problem, or if I have been doing something wrong.

My EA trades on the opening prices.
 
Hi,

When I just make copy KOH indicator to KOH_1 and make copy also for 1000.def, both of them are working properly.

Unfortunately, when I try to call PNN, the MT4 crash directly, this happened usually when we use two indicators that using same dll. I tried to removed both KOH and KOH_1 indicator and call PNN indicator, still make MT4 closed by itself.

Any advice to prevent this crash during calling PNN indicator?

Thanks
 
I do not use the actual values of the indicators. I use the differentials between their previous values (lag).

Hi mr.future,

Can you explain more?How do you use the differentials between their previous values ,can you give an example ?Many thanks .
 
I am from Russia. So I want to apologize for my English.)
More effective at classification categories {Open [w - 1]> Open [w]} = 1 and {Open [w - 1] <Open [w]} = -1 shows a light CandlCode_ICS. Classification result is shown in the chart. This indicator allows you to take into account the characteristics of the candle conformations and influence the relationship between extreme prices. The entrances
for (int j = 0; j <= 44; j)
{
var = iCustom (NULL, 0, "CandlCode_ICS", 5 + j, 0.5, 0, w) -
iCustom (NULL, 0, "CandlCode_ICS", 5 + j, 0.5, 0, w + 1);
if (var > 0) inarray [j] = 1;
else inarray [j] = -1;
}
 

Attachments

  • Безымянный2.JPG
    Безымянный2.JPG
    186 KB · Views: 747
Hi,

This is another sample of chart to indicate that Proteus is repainted indicator, the past value of proteus is repainted with actual/real MACDs.

On the first picture, predicted MACD and MACD signal are almost at the same place, but after few hours the prediction s changed/repainted.

Proteus, as one of your client I need your explanation.

thank you
Arry
Hi Arry, you got a reply and an explanation in the other forum you posted (forexpeacearmy). I haven't read this forum in a while (and probably won't in the future either) and that's why you did not get an answer here.

In other news, there are now multiple indicators in the same package. MACD(19,26,9) and Stochastic (10,10,20) are now supported. Both have pretty good accuracy, I'm happy with their performance.
 
Arry..
I see that Proteus has replied to your complaint about repainting. But he put it on another forum. Can you post it here for all to see?
 
Mr Future,
KOH is one input to PNN.
Zig_Zag_NK is one input to KOH.
But Zig_Zag_NK has no defined value at the current bar, or for several bars previous. It repaints.
So KOH must repaint, and PNN must repaint.
If this is not true, please explain why.:confused:
Perhaps you should leave Zig Zag out of your indicators?
 
To avoid changes in output (or sectors ZigZag reversal prices High and Low) in the allocation patterns for the study, you can use any range indicator excluding the value of the last extreme. Then appeal to the indicator will be of the form
iCustom (NULL, 0, "ZigZag_NK", 89,5,3,1, shift);
shift - the number of bars ago.
In constructing the Kohonen network, I have not used the indicator. And in the PNN is used as an output. Trading signals are not changed. Kohonen network, I use mainly for the transformation of the initial indicators.
The new indicators allow us to generalize the original testimony and thus provide new job opportunities that improve the performance of trading systems.
 
To avoid changes in output (or sectors ZigZag reversal prices High and Low) in the allocation patterns for the study, you can use any range indicator excluding the value of the last extreme. Then appeal to the indicator will be of the form
iCustom (NULL, 0, "ZigZag_NK", 89,5,3,1, shift);
shift - the number of bars ago.
In constructing the Kohonen network, I have not used the indicator. And in the PNN is used as an output. Trading signals are not changed. Kohonen network, I use mainly for the transformation of the initial indicators.
The new indicators allow us to generalize the original testimony and thus provide new job opportunities that improve the performance of trading systems.
Hello Mr Future,
Thank you for your generous contributions to this thread. I compliment you on your English, and apologize that I cannot communicate in Russian.
However,I do not fully understand your last post.

Perhaps I have misunderstood ZigZag. It does not display the last few bars, because if it did it would repaint. It cannot decide where the next pivot point is, until the pivot point occurs. So it does not know the slope of the last segment. This means that ZigZag is undertermined for the last few bars. But perhaps the version that you call is determined up to the current bar. If so it must be determined to be some value that will eventually change, since the slope of the last segment is unknown until the endpoint is found sometime in the future.

Perhaps the version of KOH that you use does not use ZigZag, but the version that you posted (KOH.mq4) does call ZigZag.
Here, there is a call in the start() routine
while(i>=0)
{
innet(i);
.
.
.
Then in innet(shift), there is calculation
double l=iCustom(NULL,0,"ZigZag_NK",89,5,3,0,shift);
double h=iCustom(NULL,0,"ZigZag_NK",89,5,3,1,shift);
if (l>0) {inarray[20]=1; inarray[21]=0;}
if (h>0) {inarray[20]=0; inarray[21]=1;}
if (h==0&&l==0) { inarray[20]=0; inarray[21]=0;}

So the input array to the Kohonen net includes a feature that depends on the value of ZigZag. Hence the output of the Kohonen net must also depend on ZigZag.

In PNN.mq4, there is a call to another innet function
void innet(int shift)
{
inarray[0]=iCustom(NULL,0,"KOH_1",0,shift);
inarray[1]=iCustom(NULL,0,"KOH_1",0,shift+1);
inarray[2]=iCustom(NULL,0,"KOH_1",0,shift+2);
inarray[3]=iCustom(NULL,0,"KOH_1",0,shift+3);
inarray[4]=iCustom(NULL,0,"KOH_1",0,shift+4);
}

So the output of PNN must depend on KOH as an input...
I don't understand why ZigZag does not cause PNN to repaint.:confused:

If KOH_1 is different, perhaps you could post it?
 
Last edited:
ZigZag performs the task as a function of the optimum signal (output).
And it does not entirely correct.
You can think of other optimal signals.
For example, certain colors next candle or candle conformation. Or the definition of price deviation at a certain level.
 
ZigZag performs the task as a function of the optimum signal (output).
And it does not entirely correct.
You can think of other optimal signals.
For example, certain colors next candle or candle conformation. Or the definition of price deviation at a certain level.
I understand that you can use ZigZag as an output, or target . But KOH uses it in the input array to a net.
 
Hi All,

Here is the proteus answer on forexpeacearmy forum:
I think mr. arryex did not understand the purpose or how the indicator works.

Mr. arryex, this is not an attempt to deceive you or our users by any means.
It is clear from the website description, from the screenshots and from the video, that this is how the indicator works. Even if by some chance it was still not clear for someone, they were and are welcomed to send an email to [email protected] to clarify any questions or doubts that they may have, before making a purchase. This is repeatedly written throughout the website.

You complain of that "the indicator is not as what they claim, i.e. neural network prediction for MACD(20,200,20)". But it is exactly that. The future values are predicted using a neural network algorithm, embedded in the dll file.

You also complain that previous prediction lines will be overwritten with the real value of MACD. This is true and I never claimed otherwise, but if you think about it, seeing as the prediction is made for 5 bars in advance, there is no other way to display the information except to overwrite previous values. I'm going to try to explain why: at each bar, there can be one value. Consider the 5th bar (let's call it 'X') in the future gets it's prediction as value v1. When time passes and the current bar finishes forming, the prediction is refined and bar X in now the 4th in the future and gets a new, more accurate value v2. This happens repeatedly until bar X becomes the current bar forming. So bar X gets 5 values as time passes. Which one to display and why ? Who makes this decision? If I choose the first value, someone else will complain that it should have been the 2nd value, and reverse. There might be some value in leaving the last prediction drawn instead of replacing it with the real MACD; or maybe adding more indicator lines; this is something that the few developers that I have will look into, if many people request it.
=================
Here is my answer:
Hi mr. proteus,

In my opinion:
- It is not fair to claim prediction accuracy more than 90% for predicted values 1 bar, 2 bar in future, In the meantime you remove the predicted value and overwrite with the real values.
- I understand most of predicted indicators are to predict the value in future, but to see the perfomance need to compare the past predicted values and the real values. I am sursprised that you remove the predicted indicator then overwrite with the actual value. Means forget what has been predicted, what ever your trade position and just see the next predicted value.. As the real sample, if the predicted MACD tell that next 5 bar in future will be cross down, after 3 bars completed your predicted values said cross up...meanwhile the previous prediction has been gone (overwritten with the real values).
- I could not confirm on real that your indicator has more 90% accuracy as you claimed. The statement about indicator accuracy make all people interested to buy..but in fact I do not get it...
- You said there is no other way to display the information except to overwrite previous values. You can... put predicted and real values in different buffer and display both of them..so you can see their past values..Only by comparing them you can claim 90% accuracy. You need to learn more how to to make a good indicator prior selling it, try for your self..
- I am curious when we ask you the real perforrmance of your indicator or even by creating an Expert advisor, i am sure you don't have it..

My conclusion:
- your indicator only display next predicted values but forgeting what has been predicted (either good/bad prediction) after new bar coming.
- Your accuracy can not be confirmed in actual because you overwrite the predicted with the actual values.
- Claim 90% accuracy is not correct for me...
- Your indicator is repainted, since you remove/change/overwrite the predicted values.
 
The results of the network is very impressive ... :cheesy:
 

Attachments

  • COOL.JPG
    COOL.JPG
    95.6 KB · Views: 901
Top