Build Neural Network Indicator in MT4 using Neuroshell

Here are the files, I could not found the password but I have the native one, I reprint in pdf, to open use arryex2013 as password
 

Attachments

  • Train using NS predictor 2013.pdf
    440.9 KB · Views: 548
  • Using NS2 for Train and Test 2013.pdf
    370.5 KB · Views: 622
Price divergence with indicator

hi Arry and anyone,

have you successful created indicator based on Price divergence with indicators ?

for example Price Regular divergence with Stochastic or RSI.

I have no idea how to do it :( . How to find Price higher high & at the same time looking for lower high of stochastic.

Can anyone shed some lights or :idea: what is the formula or calculation in NST.

Thanks.
 
Hi Eto.

The idea of discrepancy in simple word:
- If High > previous High AND
- RSI < previous RSI

Just create indicator based on Rules and relation.
More sophisticated indicator can be created using programming.

hi Arry and anyone,

have you successful created indicator based on Price divergence with indicators ?

for example Price Regular divergence with Stochastic or RSI.

I have no idea how to do it :( . How to find Price higher high & at the same time looking for lower high of stochastic.

Can anyone shed some lights or :idea: what is the formula or calculation in NST.

Thanks.
 

Attachments

  • Discrepancy High RSI.png
    Discrepancy High RSI.png
    24.9 KB · Views: 367
Thanks Arry,

For highest high I use max function.

But What's the function or methods u use to save or find previous highest high?

Sorry..I'm still not familiar with all functions available. Have explored all functions and try to look in help file but couldn't find something about previous Highest high.

Tq.

Hi Eto.

The idea of discrepancy in simple word:
- If High > previous High AND
- RSI < previous RSI

Just create indicator based on Rules and relation.
More sophisticated indicator can be created using programming.
 
hi Eto,

You may check On Sdk programming sampel to get highest high, with additional coding we can expand it with discrepancy features.

Using Prince basic indicator you can get highest at certain range. I am not checking yet, if these indicators are available in S&C magazine sampel.
 
Last edited:
Ok TQ Arry.

I'll contact ward about this.

hi Eto,

You may check On Sdk programming sampel to get highest high, with additional coding we can expand it with discrepancy features.

Using Prince basic indicator you can get highest at certain range. I am not checking yet, if these indicators are available in S&C magazine sampel.
 
Hi Arryex and Everyone,

I have attached a xls file with the Monte Carlo (MC) to evaluate the trading systems. Also, I have attached a document about that.

Please take a look on the document (pdf) and verify the xls file. Let me know any issue, comments or any idea to improve this test verification. Thanks

The chart additionally shows the cumulative average profit per trade. By definition this is a straight line, and is shown in red. You can compare the equity curve generated by the Monte Carlo analysis in blue with the average equity growth shown in red

Clarod.
 

Attachments

  • Clarod_MC_Evaluating Trading Systems (Monte Carlo)_V1.xls
    114 KB · Views: 401
  • Clarod_MC_Evaluating Trading Systems By John Ehlers.pdf
    198.6 KB · Views: 599
  • Clarod_MC_Screen NSDT.jpg
    Clarod_MC_Screen NSDT.jpg
    266.4 KB · Views: 346
  • Clarod_MC_Screen xls.jpg
    Clarod_MC_Screen xls.jpg
    200.5 KB · Views: 341
Hi Clarod,

On pdf file, page 1, i think #L is number of looses trade

Some variables that are not clearly mentioned are:
PF = $W/$L and % = #W/(#W + #L)

I verify that AveWin/AveLoss = ($W/#W)/($L/#L) = PF (1 - %)/%
and AveTrade=T=%(PF+1) -1, with normalization $L/#L=1

On your excel file, you calculate Cumulative Average Profit (in column E) as (#W+#L)((PF+1)%-1)
in the mean time average trade T= %(PF+1)-1, then you define cumulative average profit = (#W+#L)*T, i.e. number of trade*average trade, where T=($W-$L)/(#W+#L) then cumulative average profit= $W-$L.

You already set that your PF=2.59, then $W/$L =2.59 ($W=2.59 and $L=-1), in reality the $W and $L is never fixed or you trade, getting cumulative $W and $L then calculate PF.

Any information, what is actually you intend to verify?
 
Last edited:
Hi Clarod,

On pdf file, page 1, i think #L is number of looses trade

Some variables that are not clearly mentioned are:
PF = $W/$L and % = #W/(#W + #L)

I verify that AveWin/AveLoss = ($W/#W)/($L/#L) = PF (1 - %)/%
and AveTrade=T=%(PF+1) -1, with normalization $L/#L=1

On your excel file, you calculate Cumulative Average Profit (in column E) as (#W+#L)((PF+1)%-1)
in the mean time average trade T= %(PF+1)-1, then you define cumulative average profit = (#W+#L)*T, i.e. number of trade*average trade, where T=($W-$L)/(#W+#L) then cumulative average profit= $W-$L.

You already set that your PF=2.59, then $W/$L =2.59 ($W=2.59 and $L=-1), in reality the $W and $L is never fixed or you trade, getting cumulative $W and $L then calculate PF.

Any information, what is actually you intend to verify?

Many Thanks Arryex,

Really I use WFA but in the case "Monte Carlos" I think that is a additional verification but really I'm not sure. When I saw the .pdf that I have attached, I created xls files to sharing to other people. Have you use "Monte Carlo" as part of test verification ?.... in the case that you used this method what tool did you use ?.. and as a last question...what is your opinion about MC?
Thanks for your time !
 
Hi Clarod,

I have additional comment on your Excel file:
- On Cell C4, it should be empty, since initially you will not have any cumulative profit before you trade
- C5 = B5
- C6=C5+B6, the cumulative profit = previous profit + current profit
- To ensure that the summation is correct, you should have sum(B5:B504) equal to C504.

See attached corrected file and the graph.

Regarding the MC, previously I use Oracle Crystalball to forecast an output value based on several assumption related to probability of input values. I personally use for project management and cost estimation.

Here actual sample, if you intend to buy a housing complex then want to rent them, you have assumption:
-$500 per month is the going rent for the area.
- The number of units rented during any given month will be somewhere between 30 and 40.
- Operating costs will average around $15,000 per month for the entire complex, but might vary slightly from month to month.
You want to calculate how much profit/loss you will get monthly, you can manually simulate the calculation one by one and varying the input values. See detail on attached excel file.
Using CB, we can do the simulations for certain trials and certain probability of distribution for the inputs. You can evaluate attached excel, I attach the screenshot while running it.
So far, I could not found the example of CB for trading application. You may download and have a 30 day trial period to use this software.

I made similar evaluation using CB see attached result. I do not necessary to create calculation randomly, because CB already made for me.
 

Attachments

  • Clarod_MC.png
    Clarod_MC.png
    88 KB · Views: 361
  • Crystalball example - Futura Apartments.xls
    429.5 KB · Views: 3,032
  • Clarod_MC using CB.png
    Clarod_MC using CB.png
    113.9 KB · Views: 363
Last edited:
Hi Clarod,

I have additional comment on your Excel file:
- On Cell C4, it should be empty, since initially you will not have any cumulative profit before you trade
- C5 = B5
- C6=C5+B6, the cumulative profit = previous profit + current profit
- To ensure that the summation is correct, you should have sum(B5:B504) equal to C504.

See attached corrected file and the graph.

Regarding the MC, previously I use Oracle Crystalball to forecast an output value based on several assumption related to probability of input values. I personally use for project management and cost estimation.

Here actual sample, if you intend to buy a housing complex then want to rent them, you have assumption:
-$500 per month is the going rent for the area.
- The number of units rented during any given month will be somewhere between 30 and 40.
- Operating costs will average around $15,000 per month for the entire complex, but might vary slightly from month to month.
You want to calculate how much profit/loss you will get monthly, you can manually simulate the calculation one by one and varying the input values. See detail on attached excel file.
Using CB, we can do the simulations for certain trials and certain probability of distribution for the inputs. You can evaluate attached excel, I attach the screenshot while running it.
So far, I could not found the example of CB for trading application. You may download and have a 30 day trial period to use this software.

I made similar evaluation using CB see attached result. I do not necessary to create calculation randomly, because CB already made for me.

Many thanks Arryex !!,

I'll see it with more details and I'll let you know if I have any doubt, thanks for sharing information about CB !!

I wish you a good holiday season and a happy New Year:clap:
 
Hi Arryex,

I like to work with cybernetic indicators and I have created my first .DLL for NSDT. If you want this DLL please let me know and I'll send it to you. Also, I saw a document about Corona Chart and I'll working on these indicators but before to do that I would like to know what is your opinion about "Corona Chart" or any comments about other good indicators to recommend.

Thanks in advance ! :D
 

Attachments

  • Screen sample NSDT_EURUSD H1.jpg
    Screen sample NSDT_EURUSD H1.jpg
    188 KB · Views: 548
Last edited:
Hi Clarod,

Yes you can send it to me, preferred if you can send the c code, I would compare it the formula given by Ehler. I found inside mq4 code:

if (NumOfBars < 7)
{
Smooth= (iMA(NULL,0,1,0,0,Price,i) + (2*iMA(NULL,0,1,0,0,Price,i+1)) + (2*iMA(NULL,0,1,0,0,Price,i+2)))/4;
}
Smooth= (iMA(NULL,0,1,0,0,Price,i) + (2*iMA(NULL,0,1,0,0,Price,i+1)) + (2*iMA(NULL,0,1,0,0,Price,i+2)) + iMA(NULL,0,1,0,0,Price,i+3))/6;
Itrend= (alpha - alpha*alpha/4) * Smooth+ 0.5*alpha*alpha*Smooth[i+1] - (alpha-0.75*alpha*alpha)*Smooth[i+2] + 2*(1 - alpha)*Itrend[i+1] - (1 - alpha)*(1 - alpha)*Itrend[i+2];

Trigger= Itrend[i+1];
}

About corona, I am not sure if we can show the corona in NST. I have sample in MT4, if you have the formula and implement it on C then you can create dll file.

Here I shown Itrend and corona in MT4
 

Attachments

  • itrend - corona in mt4.png
    itrend - corona in mt4.png
    68.6 KB · Views: 830
I like to work with cybernetic indicators .I would like to know what is your opinion about "Corona Chart" or any comments about other good indicators to recommend.

Thanks in advance ! :D

Check ''Krzysztof'' s and Mladen's comments about John Ehlers, I agree with what they say about him.
 
Tovim is right, all Ehler's indicator are based on MA readjustment.

Just compare itrend with JMA...
 

Attachments

  • Itrend vs JMA.png
    Itrend vs JMA.png
    28.1 KB · Views: 436
Hi Clarod,

Yes you can send it to me, preferred if you can send the c code, I would compare it the formula given by Ehler. I found inside mq4 code:

if (NumOfBars < 7)
{
Smooth= (iMA(NULL,0,1,0,0,Price,i) + (2*iMA(NULL,0,1,0,0,Price,i+1)) + (2*iMA(NULL,0,1,0,0,Price,i+2)))/4;
}
Smooth= (iMA(NULL,0,1,0,0,Price,i) + (2*iMA(NULL,0,1,0,0,Price,i+1)) + (2*iMA(NULL,0,1,0,0,Price,i+2)) + iMA(NULL,0,1,0,0,Price,i+3))/6;
Itrend= (alpha - alpha*alpha/4) * Smooth+ 0.5*alpha*alpha*Smooth[i+1] - (alpha-0.75*alpha*alpha)*Smooth[i+2] + 2*(1 - alpha)*Itrend[i+1] - (1 - alpha)*(1 - alpha)*Itrend[i+2];

Trigger= Itrend[i+1];
}

About corona, I am not sure if we can show the corona in NST. I have sample in MT4, if you have the formula and implement it on C then you can create dll file.

Here I shown Itrend and corona in MT4


Arryex and for everyone, I attached a zip file with the files (.cht .bas (source PowerBASIC)) and .dll of ITrend and Trigger Cybernetic Indicators. I used "Cybernetic Analysis for Stocks and Futures (John F. Ehlers)" book (charpter3) and based on the code bellow in EasyLanguage I converted it to PowerBASIC

Inputs: Price((H+L)/2),
alpha(.07);
Vars: Smooth(0),
ITrend(0),
Trigger(0);
ITrend = (alpha - alpha*alpha/4)*Price
+ .5*alpha*alpha*Price[1] - (alpha
- .75*alpha*alpha)*Price[2] + 2
*(1 - alpha)*ITrend[1] - (1 - alpha)
*(1 - alpha)*Itrend[2];
If currentbar < 7 then ITrend = (Price + 2*Price[1]
+ Price[2]) / 4;
Trigger = 2*Itrend - ITrend[2];
Plot1(Itrend, “ITrend”);
Plot2(Trigger, “Trig”);


About Corona, I attached a .gif files from http://www.traders.com/Documentation/FEEDbk_docs/2008/11/TradersTips/TradersTips.html#NEUROSHELL ... I'll trying to do that... (when I have time)

Regards,
clarod
 

Attachments

  • clarod_Itrend.zip
    143.4 KB · Views: 353
  • Corona Charts NSDT.gif
    Corona Charts NSDT.gif
    32.1 KB · Views: 621
Hi Clarod,

I try to make itrend using MS Visual c,

// itrendc.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
__declspec(dllexport) void __stdcall itrendc(double *price, long int barcount, double *out)
{
double alpha;
double missing=3.4e38;
long int i;
for(i=0; i<=barcount-1;i++) //iterate through bars - one at a time
{
if (i < 1) // ' this is the oldest bar, and has no previous
{
out = missing; //' output a blank
alpha = 0.07;
}
else
if(i>=1 && i < 10) out = (price + 2*price[i-1] + price[i-2]) / 4;
else
{
alpha = 0.07;
out= (alpha - alpha*alpha/4)* price + 0.5 * alpha * alpha * price[i-1] - (alpha - .75*alpha*alpha)* price[i-2] + 2 * (1 - alpha) * out[i-1]- (1 - alpha) * (1 - alpha) * out[i-2];
}
}
}

Using Powerbasic we get smaller size of dll file compare to visual C (too much stuff included on MS dll version)..
 

Attachments

  • itrend in c.png
    itrend in c.png
    66.7 KB · Views: 479
Last edited:
Top