fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Deneris
    3. Posts
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by Deneris

    • RE: EA for indicators applied to Previous data

      iMAOnArray () should give me the value of the moving average and save it in the buffer and makes it from left to right while ArraySetAsSeries () from right to left. The problem is that in mql4 does not seem to be a "native" operation mine.
      But I saw around someone who succeeds in this intent. In my case the value obtained differs from what appears on the chart.

      posted in Questions & Answers
      D
      Deneris
    • EA for indicators applied to Previous data

      Hi,
      I need to get the values of bollinger bands that are built on a mobile medium, which in turn is built on stochastic.
      To recap:

      • Stochastic
           - Moving average
             - Bollinger bands

      That's what I did

      double BufferSto[];                                 //Buffer containing stochastic values
      double BufferiMaExpSto[];                    // Buffer containing the values of the moving average
      double iBandUpMaExpSto=0.0;      // BB Band UPPER
      double iBandDwMaExpSto=0.0;     // BB band DOWN
      
      int OnInit()
        {
        
         ArrayResize(BufferSto,STO_KPeriod);
         ArrayResize(BufferiMaExpSto,IMA_Period);
         
         return(INIT_SUCCEEDED);
        }
      
      void OnTick()
        {
         if (IsNewBar()){
         
         
         for(int i=1; i<STO_KPeriod; i++)  
            
            BufferSto[i-1]              = iStochastic(NULL,0,STO_KPeriod,STO_DPeriod,STO_Slowing,MODE_SMA,1,MODE_MAIN,i);
            
         
         ArraySetAsSeries(BufferSto, true);
         
          for(int i=1; i<IMA_Period; i++) 
            BufferiMaExpSto[i-1]          = iMAOnArray(BufferSto,0,IMA_Period,0,MODE_EMA,i);                                                        
         
            ArraySetAsSeries(BufferiMaExpSto, true);
         
            iBandUpMaExpSto = NormalizeDouble(iBandsOnArray(BufferiMaExpSto,0,BBPeriodMaExpSto,BBDevizioneMaExpSto,0,MODE_LOWER,1),Digits);
         iBandDwMaExpSto  = NormalizeDouble(iBandsOnArray(BufferiMaExpSto,0,BBPeriodMaExpSto,BBDevizioneMaExpSto,0,MODE_UPPER,1),Digits);
      
         }
          if(!IsTradingTime()) return;
      
         }
      

      If I try to print on the video the bandwidth or indicators value I notice that they do not match the values that are on the chart given by the same indicators.
      What am I doing wrong?

      Many thanks in advance

      posted in Questions & Answers
      D
      Deneris
    • 1 / 1