Forum migration - read now! - page 2

 
NKTrade:

Not work like that sir, sometimes it work with another indicator but in this case ( after 2 hours) i found "averages - mtf + alerts 7_9.ex4"

I hope soon everything will be finish and normal again

I hope so too :)
 
I hope the new interface is good
 

A workaround while waiting

Since file upload is not working, till that issue is solved, pleas ll use the source control to post the code of anything that needs assistance or what is intended to be uploaded as usual. Something like this :

//------------------------------------------------------------------
#property copyright "mladen"
#property link      "www.forex-tsd.com"
#property description "file name Macd - std normalized 1_2"
//------------------------------------------------------------------
#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1  clrDodgerBlue
#property indicator_color2  clrSandyBrown
#property indicator_color3  clrSandyBrown
#property indicator_color4  clrSilver
#property indicator_width1  2
#property indicator_width2  2
#property indicator_width3  2
#property strict

//
//
//
//
//

enum colorOn
{
   clrOnSlope, //Color change on slope change
   clrOnZero,  // Color change on zero cross
   clrOnSign   // Color change on signal cross
};

extern ENUM_TIMEFRAMES    TimeFrame    = PERIOD_CURRENT; // Time frame to use
extern int                FastMAPeriod  = 23;            // Fast macd period
extern int                SlowMAPeriod  = 50;            // Slow macd period
extern int                SignalPeriod  = 9;             // Signal period
extern int                StdPeriod     = 50;            // Standard deviation used for normalization
extern ENUM_APPLIED_PRICE Price         = PRICE_CLOSE;   // Price to use 
extern double             Filter        = 0;             // Filter to apply to macd value
extern int                FilterPeriod  = 0;             // Filter period to use (<= to use the slow macd period)
extern colorOn            ColorChangeOn = clrOnSlope;    // Color change on : 
extern bool               Interpolate   = true;          // Interpolate in multi time frame mode?

//
//
//
//
//

double macdBuffer[];
double macdBufferUA[];
double macdBufferUB[];
double signal[];
double slope[];
double prices[];
string indicatorFileName;
bool   returnBars;


//------------------------------------------------------------------
//
//------------------------------------------------------------------
//
//
//
//
//

int init()
{
   IndicatorBuffers(6);
      SetIndexBuffer(0,macdBuffer);
      SetIndexBuffer(1,macdBufferUA);
      SetIndexBuffer(2,macdBufferUB);
      SetIndexBuffer(3,signal);
      SetIndexBuffer(4,slope);
      SetIndexBuffer(5,prices);
         indicatorFileName = WindowExpertName();
         returnBars        = TimeFrame==-99;
         TimeFrame         = MathMax(TimeFrame,_Period);
   IndicatorShortName(timeFrameToString(TimeFrame)+" MACD (std normalized) ("+(string)FastMAPeriod+","+(string)SlowMAPeriod+","+(string)Filter+","+(string)FilterPeriod+")");
   return(0);
}

int deinit()
{
   return(0);
}

//------------------------------------------------------------------
//
//------------------------------------------------------------------
//
//
//
//
//

int start()
{
   int counted_bars=IndicatorCounted();
      if(counted_bars < 0) return(-1);
      if(counted_bars>0) counted_bars--;
         int limit = MathMin(Bars-counted_bars,Bars-1);
         if (returnBars) { macdBuffer[0] = limit+1; return(0); }
         if (TimeFrame!=Period())
         {
            limit = (int)MathMax(limit,MathMin(Bars-1,iCustom(NULL,TimeFrame,indicatorFileName,-99,0,0)*TimeFrame/Period()));
            if (slope[limit] == 1) CleanPoint(limit,macdBufferUA,macdBufferUB);
            for (int i=limit; i>=0; i--)
            {
               int y = iBarShift(NULL,TimeFrame,Time[i]);               
                  macdBuffer[i] = iCustom(NULL,TimeFrame,indicatorFileName,PERIOD_CURRENT,FastMAPeriod,SlowMAPeriod,SignalPeriod,StdPeriod,Price,Filter,FilterPeriod,ColorChangeOn,0,y);
                  signal[i]     = iCustom(NULL,TimeFrame,indicatorFileName,PERIOD_CURRENT,FastMAPeriod,SlowMAPeriod,SignalPeriod,StdPeriod,Price,Filter,FilterPeriod,ColorChangeOn,3,y);
                  slope[i]      = iCustom(NULL,TimeFrame,indicatorFileName,PERIOD_CURRENT,FastMAPeriod,SlowMAPeriod,SignalPeriod,StdPeriod,Price,Filter,FilterPeriod,ColorChangeOn,4,y);
                  if (!Interpolate || (i>0 && y==iBarShift(NULL,TimeFrame,Time[i-1]))) continue;
                  
                  //
                  //
                  //
                  //
                  //
                  
                  int n,j; datetime time = iTime(NULL,TimeFrame,y);
                     for(n = 1; (i+n)<Bars && Time[i+n] >= time; n++) continue; 
                     for(j = 1; j<n && (i+n)<Bars && (i+j)<Bars; j++)
                     {
                        macdBuffer[i+j] = macdBuffer[i] + (macdBuffer[i+n]-macdBuffer[i])*j/n;
                        signal[i+j]     = signal[i]     + (signal[i+n]    -signal[i]    )*j/n;
                     }
            }
            for (int i=limit; i>=0; i--) if (slope[i]==-1) PlotPoint(i,macdBufferUA,macdBufferUB,macdBuffer);
            return(0);                  
         }

   //
   //
   //
   //
   //

   int fltPeriod = FilterPeriod; if (fltPeriod<=0) fltPeriod = SlowMAPeriod;   
   if (slope[limit] == 1) CleanPoint(limit,macdBufferUA,macdBufferUB);
   for(int i = limit; i >= 0; i--)
   {
      prices[i] = iMA(NULL,0,1,0,MODE_SMA,Price,i);
      double std = iStdDev(NULL,0,StdPeriod,0,MODE_SMA,Price,i);
         if (std!=0)
               macdBuffer[i] = iFilter((iEma(prices[i],FastMAPeriod,i,0)-iEma(prices[i],SlowMAPeriod,i,1))/std,Filter,fltPeriod,i);
         else  macdBuffer[i] = iFilter(                                                                      0,Filter,fltPeriod,i);
         signal[i] = iEma(macdBuffer[i],SignalPeriod,i,2);
      
      if (i>=Bars-1) continue;
      
      //
      //
      //
      //
      //
      
      macdBufferUA[i] = EMPTY_VALUE;
      macdBufferUB[i] = EMPTY_VALUE;
      slope[i]       = slope[i+1];
      switch (ColorChangeOn)
      {
         case clrOnSlope: 
            if (macdBuffer[i] > macdBuffer[i+1]) slope[i] =  1;
            if (macdBuffer[i] < macdBuffer[i+1]) slope[i] = -1;
            break;
         case clrOnZero: 
            if (macdBuffer[i] > 0) slope[i] =  1;
            if (macdBuffer[i] < 0) slope[i] = -1;
            break;
         default : 
            if (macdBuffer[i] > signal[i]) slope[i] =  1;
            if (macdBuffer[i] < signal[i]) slope[i] = -1;
            break;
      }      
      if (slope[i]==-1) PlotPoint(i,macdBufferUA,macdBufferUB,macdBuffer);
   }   
   return(0);
}


//-------------------------------------------------------------------
//                                                                  
//-------------------------------------------------------------------
//
//
//
//
//

double workEma[][3];
double iEma(double price, double period, int r, int instanceNo=0)
{
   if (ArrayRange(workEma,0)!= Bars) ArrayResize(workEma,Bars); r=Bars-r-1;
   if (period<=1) { workEma[r][instanceNo]=price; return(price); }

   //
   //
   //
   //
   //
      
   workEma[r][instanceNo] = price;
   double alpha = 2.0 / (1.0+period);
   if (r>0)
          workEma[r][instanceNo] = workEma[r-1][instanceNo]+alpha*(price-workEma[r-1][instanceNo]);
   return(workEma[r][instanceNo]);
}

//
//
//
//
//

#define filterInstances 1
double workFil[][filterInstances*3];

#define _fchange 0
#define _fachang 1
#define _fprice  2

double iFilter(double tprice, double filter, int period, int i, int instanceNo=0)
{
   if (filter<=0) return(tprice);
   if (ArrayRange(workFil,0)!= Bars) ArrayResize(workFil,Bars); i = Bars-i-1; instanceNo*=3;
   
   //
   //
   //
   //
   //
   
   workFil[i][instanceNo+_fprice]  = tprice; if (i<1) return(tprice);
   workFil[i][instanceNo+_fchange] = MathAbs(workFil[i][instanceNo+_fprice]-workFil[i-1][instanceNo+_fprice]);
   workFil[i][instanceNo+_fachang] = workFil[i][instanceNo+_fchange];

   for (int k=1; k<period && (i-k)>=0; k++) workFil[i][instanceNo+_fachang] += workFil[i-k][instanceNo+_fchange];
                                            workFil[i][instanceNo+_fachang] /= period;
    
   double stddev = 0; for (int k=0;  k<period && (i-k)>=0; k++) stddev += MathPow(workFil[i-k][instanceNo+_fchange]-workFil[i-k][instanceNo+_fachang],2);
          stddev = MathSqrt(stddev/(double)period); 
   double filtev = filter * stddev;
   if( MathAbs(workFil[i][instanceNo+_fprice]-workFil[i-1][instanceNo+_fprice]) < filtev ) workFil[i][instanceNo+_fprice]=workFil[i-1][instanceNo+_fprice];
        return(workFil[i][instanceNo+_fprice]);
}

//-------------------------------------------------------------------
//                                                                  
//-------------------------------------------------------------------
//
//
//
//
//

void CleanPoint(int i,double& first[],double& second[])
{
   if (i>=Bars-3) return;
   if ((second[i]  != EMPTY_VALUE) && (second[i+1] != EMPTY_VALUE))
        second[i+1] = EMPTY_VALUE;
   else
      if ((first[i] != EMPTY_VALUE) && (first[i+1] != EMPTY_VALUE) && (first[i+2] == EMPTY_VALUE))
          first[i+1] = EMPTY_VALUE;
}

void PlotPoint(int i,double& first[],double& second[],double& from[])
{
   if (i>=Bars-2) return;
   if (first[i+1] == EMPTY_VALUE)
      if (first[i+2] == EMPTY_VALUE) 
            { first[i]  = from[i];  first[i+1]  = from[i+1]; second[i] = EMPTY_VALUE; }
      else  { second[i] =  from[i]; second[i+1] = from[i+1]; first[i]  = EMPTY_VALUE; }
   else     { first[i]  = from[i];                           second[i] = EMPTY_VALUE; }
}

//-------------------------------------------------------------------
//
//-------------------------------------------------------------------
//
//
//
//
//

string sTfTable[] = {"M1","M5","M15","M30","H1","H4","D1","W1","MN"};
int    iTfTable[] = {1,5,15,30,60,240,1440,10080,43200};

string timeFrameToString(int tf)
{
   for (int i=ArraySize(iTfTable)-1; i>=0; i--) 
         if (tf==iTfTable[i]) return(sTfTable[i]);
                              return("");
}


After that we can use the usual copy past to metaeditor and we can work from then on as usual

 
mntiwana:

Dearest MLADEN

mean time forums are not fully functional,i want some benefits of it.here is a neuro trend indi but fixed for M15,can you plz manage time for to turn it work in other TFs,M1,M5.

regards

mntiwana


The problem is that uploaded files can not be accessed (we are getting the :

404 - File or directory not found.


Check this post for temporary workaround : https://www.forex-tsd.com/forum/announcements-forex-press/1809030-temporary-workaround-for-source-mq4-files-upload

 
mladen:

mntiwana


The problem is that uploaded files can not be accessed (we are getting the :

404 - File or directory not found.


Check this post for temporary workaround : https://www.forex-tsd.com/forum/announcements-forex-press/1809030-temporary-workaround-for-source-mq4-files-upload

Dearest MLADEN

yes,you are right,upload work but not accessible,so code is here.

regards

//+------------------------------------------------------------------+
//|                                         NeuroTrend_Indicator.mq4 |
//|                                 Copyright © 2008, Arun Kumar Raj |
//|                                             avoruganti@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, Arun Kumar Raj"
#property link      "avoruganti@gmail.com"

#property indicator_chart_window
#property indicator_buffers 3

#property indicator_color1 Yellow
#property indicator_width1 1

#property indicator_color2 GreenYellow
#property indicator_width2 1

#property indicator_color3 Gold
#property indicator_width3 1

//includes
#include <NeuroTrend_Include.mqh>
//---- buffers
double gmNN1[];
double gmNN2[];
double gmNN3[];

extern bool alert = true;
extern bool sendMail = false;
extern string netfile = "neurotrend.net";
extern string logfile = "netlog.txt";
extern bool log = false;
extern bool barUpdate = true;

bool gmBuy = false, gmSell = false;
int reset, gmPrevBars = 0,h1shift = 0;
double input[17];
double output[3];
double cEMA = 0, cRSI = 0, pRSI = 0, cStochMain = 0, pStochMain = 0, cStochSignal = 0, pStochSignal = 0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
    SetIndexStyle(0,DRAW_LINE,EMPTY);
    SetIndexStyle(1,DRAW_LINE,EMPTY);
    SetIndexStyle(2,DRAW_LINE,EMPTY);

    SetIndexBuffer(0,gmNN1);
    SetIndexBuffer(1,gmNN2);
    SetIndexBuffer(2,gmNN3);

    SetIndexEmptyValue(0,0.0);
    IndicatorDigits(Digits);
    SetIndexShift (0, 0);
    IndicatorShortName ("NeuroTrend");
    SetIndexLabel (0, "NeuroTrend"); 

    //create network
    int units[3] = {17, 10, 3};
    GenerateNetwork(3, units);
    ReadNetwork(netfile, logfile, log);
   
    return(0);  
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
    return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
    if(Bars < 1500) return (0);
    if(barUpdate && (gmPrevBars == Bars)) return (0);
    int limit;
    int counted_bars=IndicatorCounted();
    //---- check for possible errors
    if(counted_bars<0) return(-1);
    //---- the last counted bar will be recounted
    if(counted_bars>0) counted_bars--;
    limit=Bars-counted_bars;


    while(limit >= 0)
    {

        cEMA = iMA(NULL,PERIOD_M15,5,0,MODE_EMA,PRICE_CLOSE,limit);
        cRSI = iRSI(NULL,PERIOD_M15,9,PRICE_CLOSE,limit);
        pRSI = iRSI(NULL,PERIOD_M15,9,PRICE_CLOSE,limit+1);
        cStochMain = iStochastic(NULL,PERIOD_M15,5,3,3,MODE_EMA,0,MODE_MAIN,limit);
        pStochMain = iStochastic(NULL,PERIOD_M15,5,3,3,MODE_EMA,0,MODE_MAIN,limit+1);
        cStochSignal = iStochastic(NULL,PERIOD_M15,5,3,3,MODE_EMA,0,MODE_SIGNAL,limit);
        pStochSignal = iStochastic(NULL,PERIOD_M15,5,3,3,MODE_EMA,0,MODE_SIGNAL,limit+1);

        input[0] = gmThreshold((cEMA - iMA(NULL,PERIOD_M15,5,0,MODE_EMA,PRICE_CLOSE,limit+1))/(Point*10));
        input[1] = gmThreshold((iMA(NULL,PERIOD_M15,5,0,MODE_EMA,PRICE_CLOSE,limit+1)-iMA(NULL,PERIOD_M15,5,0,MODE_EMA,PRICE_CLOSE,limit+2))/(Point*10));
        input[2] = gmThreshold((iMA(NULL,PERIOD_M15,5,0,MODE_EMA,PRICE_CLOSE,limit+2)-iMA(NULL,PERIOD_M15,5,0,MODE_EMA,PRICE_CLOSE,limit+3))/(Point*10));
        input[3] = gmThreshold(cRSI /100);
        input[4] = gmThreshold(pRSI /100);
        input[5] = gmThreshold((iWPR(NULL,PERIOD_M15,14,limit)+100)/100);
        input[6] = gmThreshold((iWPR(NULL,PERIOD_M15,14,limit+1)+100)/100);
        input[7] = gmThreshold(iMACD(NULL,PERIOD_M15,12,26,9,PRICE_CLOSE,MODE_MAIN,limit)*100);
        input[8] = gmThreshold(iMACD(NULL,PERIOD_M15,12,26,9,PRICE_CLOSE,MODE_MAIN,limit+1)*100);
        input[9] = gmThreshold(iMACD(NULL,PERIOD_M15,12,26,9,PRICE_CLOSE,MODE_SIGNAL,limit)*100);
        input[10] = gmThreshold(iMACD(NULL,PERIOD_M15,12,26,9,PRICE_CLOSE,MODE_SIGNAL,limit+1)*100);
        input[11] = gmThreshold(cStochMain /100);
        input[12] = gmThreshold(pStochMain /100);
        input[13] = gmThreshold(cStochSignal /100);
        input[14] = gmThreshold(pStochSignal /100);
        h1shift = iBarShift(NULL,PERIOD_H1,iTime(NULL,PERIOD_M15,limit),true);
        input[15] = gmThreshold((iMA(NULL,PERIOD_H1,5,0,MODE_EMA,PRICE_CLOSE,h1shift)-iMA(NULL,PERIOD_H1,5,0,MODE_EMA,PRICE_CLOSE,h1shift+1))/(Point*10));
        input[16] = gmThreshold((iMA(NULL,PERIOD_H1,5,0,MODE_EMA,PRICE_CLOSE,h1shift+1)-iMA(NULL,PERIOD_H1,5,0,MODE_EMA,PRICE_CLOSE,h1shift+2))/(Point*10));

        SetInput(input);
        PropagateNet();   

        gmNN1[limit] = GetOutput(1)*Point*10+ cEMA;
        gmNN2[limit] = GetOutput(2)*Point*10+gmNN1[limit];
        gmNN3[limit] = GetOutput(3)*Point*10+gmNN2[limit];
        //Print(GetOutput(1)+" "+GetOutput(2)+" "+GetOutput(3));

        if((limit < 2))
        {
            if((gmBuy == false) && (gmNN3[limit] > gmNN2[limit]) && (gmNN2[limit] > gmNN1[limit]) && (gmNN1[limit] > cEMA))
            {
                if((cRSI >= pRSI) && (cRSI > 45) && (cRSI < 50) && (cStochMain > cStochSignal) && (cStochMain >= pStochMain) && (cStochMain > 20) && (cStochMain < 80) && (cStochSignal >= pStochSignal) && (cStochSignal > 20) && (cStochSignal < 80))
                {
                    if(sendMail && (IsDemo() == FALSE)) SendMail("BUY SIGNAL", DoubleToStr(Ask,5));
                    if(alert) Alert("BUY SIGNAL");
                    gmBuy = true;
                    gmSell = false;
                }
            }


            if((gmSell == false) && (gmNN3[limit] < gmNN2[limit]) && (gmNN2[limit] < gmNN1[limit]) && (gmNN1[limit] < cEMA))
            {
                if((cRSI <= pRSI) && (cRSI > 50) && (cRSI < 55) && (cStochMain < cStochSignal) && (cStochMain <= pStochMain) && (cStochMain > 20) && (cStochMain < 80) && (cStochSignal <= pStochSignal) && (cStochSignal > 20) && (cStochSignal < 80))
                {
                    if(sendMail && (IsDemo() == FALSE)) SendMail("SELL SIGNAL", DoubleToStr(Bid,5));
                    if(alert) Alert("SELL SIGNAL");
                    gmSell = true;
                    gmBuy = false;
                }
            }

        }

        limit--;
    }//end while loop


    gmPrevBars = Bars;  

    return(0);
}

//-------------------------------------------------------------------------------------------------

double gmThreshold(double value)
{

    if(value > 0.99999) return (0.99999);

    if(value < -0.99999) return (-0.99999);

    return (value);

}

//-------------------------------------------------------------------------------------------------

 
mladen:

A workaround while waiting

Since file upload is not working, till that issue is solved, pleas ll use the source control to post the code of anything that needs assistance or what is intended to be uploaded as usual. Something like this :


After that we can use the usual copy past to metaeditor and we can work from then on as usual

Dearest MLADEN

mean time forums are not fully functional,i want some benefits of it.here is a neuro trend indi but fixed for M15,can you plz manage time for to turn it work in other TFs,M1,M5.

as to me, file upload working with me,though partially.

regards

Files:
 
mntiwana:

Dearest MLADEN

yes,you are right,upload work but not accessible,so code is here.

regards


//+------------------------------------------------------------------+
//|                                         NeuroTrend_Indicator.mq4 |
//|                                 Copyright © 2008, Arun Kumar Raj |
//|                                             avoruganti@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, Arun Kumar Raj"
#property link      "avoruganti@gmail.com"

#property indicator_chart_window
#property indicator_buffers 3

#property indicator_color1 Yellow
#property indicator_width1 1

#property indicator_color2 GreenYellow
#property indicator_width2 1

#property indicator_color3 Gold
#property indicator_width3 1

//includes
#include <NeuroTrend_Include.mqh>
//---- buffers
double gmNN1[];
double gmNN2[];
double gmNN3[];

extern bool alert = true;
extern bool sendMail = false;
extern string netfile = "neurotrend.net";
extern string logfile = "netlog.txt";
extern bool log = false;
extern bool barUpdate = true;
extern ENUM_TIMEFRAMES shortTimeFrame = PERIOD_M15;
extern ENUM_TIMEFRAMES longTimeFrame = PERIOD_H1;

bool gmBuy = false, gmSell = false;
int reset, gmPrevBars = 0,h1shift = 0;
double input[17];
double output[3];
double cEMA = 0, cRSI = 0, pRSI = 0, cStochMain = 0, pStochMain = 0, cStochSignal = 0, pStochSignal = 0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{
    SetIndexStyle(0,DRAW_LINE,EMPTY);
    SetIndexStyle(1,DRAW_LINE,EMPTY);
    SetIndexStyle(2,DRAW_LINE,EMPTY);

    SetIndexBuffer(0,gmNN1);
    SetIndexBuffer(1,gmNN2);
    SetIndexBuffer(2,gmNN3);

    SetIndexEmptyValue(0,0.0);
    IndicatorDigits(Digits);
    SetIndexShift (0, 0);
    IndicatorShortName ("NeuroTrend");
    SetIndexLabel (0, "NeuroTrend"); 

    //create network
    int units[3] = {17, 10, 3};
    GenerateNetwork(3, units);
    ReadNetwork(netfile, logfile, log);
   
    return(0);  
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
{
    return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
{
    if(Bars < 1500) return (0);
    if(barUpdate && (gmPrevBars == Bars)) return (0);
    int limit;
    int counted_bars=IndicatorCounted();
    //---- check for possible errors
    if(counted_bars<0) return(-1);
    //---- the last counted bar will be recounted
    if(counted_bars>0) counted_bars--;
    limit=Bars-counted_bars;


    while(limit >= 0)
    {

        cEMA = iMA(NULL,shortTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,limit);
        cRSI = iRSI(NULL,shortTimeFrame,9,PRICE_CLOSE,limit);
        pRSI = iRSI(NULL,shortTimeFrame,9,PRICE_CLOSE,limit+1);
        cStochMain = iStochastic(NULL,shortTimeFrame,5,3,3,MODE_EMA,0,MODE_MAIN,limit);
        pStochMain = iStochastic(NULL,shortTimeFrame,5,3,3,MODE_EMA,0,MODE_MAIN,limit+1);
        cStochSignal = iStochastic(NULL,shortTimeFrame,5,3,3,MODE_EMA,0,MODE_SIGNAL,limit);
        pStochSignal = iStochastic(NULL,shortTimeFrame,5,3,3,MODE_EMA,0,MODE_SIGNAL,limit+1);

        input[0] = gmThreshold((cEMA - iMA(NULL,shortTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,limit+1))/(Point*10));
        input[1] = gmThreshold((iMA(NULL,shortTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,limit+1)-iMA(NULL,shortTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,limit+2))/(Point*10));
        input[2] = gmThreshold((iMA(NULL,shortTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,limit+2)-iMA(NULL,shortTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,limit+3))/(Point*10));
        input[3] = gmThreshold(cRSI /100);
        input[4] = gmThreshold(pRSI /100);
        input[5] = gmThreshold((iWPR(NULL,shortTimeFrame,14,limit)+100)/100);
        input[6] = gmThreshold((iWPR(NULL,shortTimeFrame,14,limit+1)+100)/100);
        input[7] = gmThreshold(iMACD(NULL,shortTimeFrame,12,26,9,PRICE_CLOSE,MODE_MAIN,limit)*100);
        input[8] = gmThreshold(iMACD(NULL,shortTimeFrame,12,26,9,PRICE_CLOSE,MODE_MAIN,limit+1)*100);
        input[9] = gmThreshold(iMACD(NULL,shortTimeFrame,12,26,9,PRICE_CLOSE,MODE_SIGNAL,limit)*100);
        input[10] = gmThreshold(iMACD(NULL,shortTimeFrame,12,26,9,PRICE_CLOSE,MODE_SIGNAL,limit+1)*100);
        input[11] = gmThreshold(cStochMain /100);
        input[12] = gmThreshold(pStochMain /100);
        input[13] = gmThreshold(cStochSignal /100);
        input[14] = gmThreshold(pStochSignal /100);
        h1shift = iBarShift(NULL,longTimeFrame,iTime(NULL,shortTimeFrame,limit),true);
        input[15] = gmThreshold((iMA(NULL,longTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,h1shift)-iMA(NULL,longTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,h1shift+1))/(Point*10));
        input[16] = gmThreshold((iMA(NULL,longTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,h1shift+1)-iMA(NULL,longTimeFrame,5,0,MODE_EMA,PRICE_CLOSE,h1shift+2))/(Point*10));

        SetInput(input);
        PropagateNet();   

        gmNN1[limit] = GetOutput(1)*Point*10+ cEMA;
        gmNN2[limit] = GetOutput(2)*Point*10+gmNN1[limit];
        gmNN3[limit] = GetOutput(3)*Point*10+gmNN2[limit];
        //Print(GetOutput(1)+" "+GetOutput(2)+" "+GetOutput(3));

        if((limit < 2))
        {
            if((gmBuy == false) && (gmNN3[limit] > gmNN2[limit]) && (gmNN2[limit] > gmNN1[limit]) && (gmNN1[limit] > cEMA))
            {
                if((cRSI >= pRSI) && (cRSI > 45) && (cRSI < 50) && (cStochMain > cStochSignal) && (cStochMain >= pStochMain) && (cStochMain > 20) && (cStochMain < 80) && (cStochSignal >= pStochSignal) && (cStochSignal > 20) && (cStochSignal < 80))
                {
                    if(sendMail && (IsDemo() == FALSE)) SendMail("BUY SIGNAL", DoubleToStr(Ask,5));
                    if(alert) Alert("BUY SIGNAL");
                    gmBuy = true;
                    gmSell = false;
                }
            }


            if((gmSell == false) && (gmNN3[limit] < gmNN2[limit]) && (gmNN2[limit] < gmNN1[limit]) && (gmNN1[limit] < cEMA))
            {
                if((cRSI <= pRSI) && (cRSI > 50) && (cRSI < 55) && (cStochMain < cStochSignal) && (cStochMain <= pStochMain) && (cStochMain > 20) && (cStochMain < 80) && (cStochSignal <= pStochSignal) && (cStochSignal > 20) && (cStochSignal < 80))
                {
                    if(sendMail && (IsDemo() == FALSE)) SendMail("SELL SIGNAL", DoubleToStr(Bid,5));
                    if(alert) Alert("SELL SIGNAL");
                    gmSell = true;
                    gmBuy = false;
                }
            }

        }

        limit--;
    }//end while loop


    gmPrevBars = Bars;  

    return(0);
}

//-------------------------------------------------------------------------------------------------

double gmThreshold(double value)
{

    if(value > 0.99999) return (0.99999);

    if(value < -0.99999) return (-0.99999);

    return (value);

}

//-------------------------------------------------------------------------------------------------
Try it out now (I could not est it, did not find the "NeuroTrend_Include.mqh" file in a hurry :))
 
mladen:
Try it out now (I could not est it, did not find the "NeuroTrend_Include.mqh" file in a hurry :))

Dearest MLADEN

thanks for taking time,no matter,we can be arrange for include file later ....but it is really strange to me,a little before send you source file,i compiled it and it compiled perfect,applied,it work perfect,but now include (mqh) file not present problem,dont know how it was compiled before and worked properly.

regards

 
mntiwana:

Dearest MLADEN

thanks for taking time,no matter,we can be arrange for include file later ....but it is really strange to me,a little before send you source file,i compiled it and it compiled perfect,applied,it work perfect,but now include (mqh) file not present problem,dont know how it was compiled before and worked properly.

regards

Check where the source is and then check if in that branch in the include folder there is that required include file
 
mladen:
Check where the source is and then check if in that branch in the include folder there is that required include file

Dearest MLADEN

no,there is no belonging mqh file any where,and now every indicator (old+new) asking for that include,this is really interesting and strange,it was compiled before and worked....let us wait till things came up in order.

regards

Reason: