fxDreema

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

    Posts made by purecnx

    • RE: Problem with find the mean ATR SD

      @fxDreema @l-andorrĂ 

      posted in Questions & Answers
      P
      purecnx
    • Problem with find the mean ATR SD

      double atrMean = CalculateATRMean(ATR_Period);

      double CalculateATRMean(int period) {
      double sum = 0;
      for (int i = 1; i <= period; i++) {
      sum += iATR(Symbol(), 0, period, i);
      }
      return sum / period;
      }

      double CalculateSD(double &values[], int size, double mean) {
      double variance = 0.0;
      for (int i = 0; i < size; i++) {
      variance += MathPow(values[i] - mean, 2);
      }
      return MathSqrt(variance / size);
      }

      USE THIS CODE IN MQLmessageImage_1738134123513.jpg

      [link text](link url)https://fxdreema.com/shared/M40hxlHTb

      How can i declareation Function in Global?

      Compilation errors
      'CalculateATRMean' - function not defined
      'CalculateATRMean' - function declarations are allowed on global, namespace or class scope only
      'CalculateSD' - function declarations are allowed on global, namespace or class scope only

      posted in Questions & Answers
      P
      purecnx
    • 1 / 1