Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 15:34:12 +0000



Auxiliary functions ERROR

View Count: 1037

[2014-12-12 17:48:36]
NickH09 - Posts: 10
Hello, i have been trying to fix this error:

Failed to get the Advanced Custom Study function address for scsf_MyFunction in Win32Project1.dll. Error: Windows error code 127: The specified procedure could not be found. | 2014-12-12 12:20:32 *

I added some auxiliary functions to ADXVMA and they doesn't seem to work.

int ObtainMax(SCStudyInterfaceRef sc, SCFloatArrayRef A, int n){
  float Max = 0;
  for (int i = 0; i < n; i++){
    if (A[i] > Max){
      Max = A[i];
    }
  }
  SCString Buffer;
  Buffer.Format("Max = %f", Max);
  sc.AddMessageToLog(Buffer, 0);

  return Max;

}

void Shift(SCStudyInterfaceRef sc, SCFloatArrayRef Array, int tam){

  for (int i = 0; i < (tam - 1); i++){
    Array[i] = Array[i + 1];
  }
  Array[tam - 1] = 0;
}

I've also tryied to log the results but doesn't log.


The modified part of the ADXVMA:

SCString Buffer;
  Buffer.Format("Log M HERE");

  ADXVMA[i] = ma[i];

  if (ADXVMA[i] > ADXVMA[i - 1]){

    sc.Subgraph[0].DataColor[i] = sc.Input[2].GetColor();

    if (sc.Subgraph[0].DataColor[i - 1] == sc.Input[3].GetColor()){
      Cont++;
    }

    if (Cont == sc.Input[5].GetInt()){
      if (ADXVMA[i] >= ObtainMax(sc, Array, sc.Input[5].GetInt())){
        sc.Subgraph[0].DataColor[i] = CYAN;
        Cont = 0;
        sc.AddMessageToLog(Buffer, 0);
      }
      else {
        Shift(sc, Array, sc.Input[5].GetInt());

        Cont--;
      }
    }
  }
  else if (ADXVMA[i] < ADXVMA[i - 1]){

    sc.Subgraph[0].DataColor[i] = sc.Input[4].GetColor();

    if (sc.Subgraph[0].DataColor[i - 1] == sc.Input[3].GetColor()){
      Cont++;
    }

    if (Cont == sc.Input[5].GetInt()){
      if (ADXVMA[i] >= ObtainMax(sc, Array, sc.Input[5].GetInt())){
    
        sc.Subgraph[0].DataColor[i] = CYAN;
        Cont = 0;
        sc.AddMessageToLog(Buffer, 0);
      }
      else {
        Shift(sc, Array, sc.Input[5].GetInt());

        Cont--;
      }
    }
  }
  else if (ADXVMA[i] == ADXVMA[i - 1]){
    Array[Cont] = ADXVMA[i];
    sc.Subgraph[0].DataColor[i] = sc.Input[3].GetColor();
    if (ADXVMA[i] > Max){
      Max = ADXVMA[i];
    }
  }


The variables Array and Price are declared this way:


  
  SCFloatArrayRef Array = sc.Subgraph[0].Arrays[1];

  SCFloatArrayRef Price = sc.BaseDataIn[sc.Input[0].GetInputDataIndex()];

I would like to know why the variables aren't getting any values

Any help would be appreciated!

Thxanks,
[2014-12-12 20:20:21]
Sierra Chart Engineering - Posts: 104368
We can only help with this:

Failed to get the Advanced Custom Study function address for scsf_MyFunction in Win32Project1.dll. Error: Windows error code 127: The specified procedure could not be found. | 2014-12-12 12:20:32 *

Are using the built-in compiler through Analysis >> Build Custom Studies DLL to create the DLL file?
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2014-12-12 20:20:37
[2014-12-12 22:16:06]
NickH09 - Posts: 10
No, im using visual studio '13.
[2014-12-12 22:47:18]
Sierra Chart Engineering - Posts: 104368
Not really sure then how we can help with this.

We recommend using the built-in compiler under Analysis >> Build Custom Studies DLL .
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account