Support Board
Date/Time: Mon, 12 May 2025 21:38:33 +0000
Post From: Auxiliary functions ERROR
[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, |