NexusFi: Find Your Edge


Home Menu

 





Auxiliary functions Error


Discussion in Sierra Chart

Updated
    1. trending_up 1,182 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

Auxiliary functions Error

  #1 (permalink)
goun
Lisboa
 
Posts: 5 since Jul 2014
Thanks Given: 0
Thanks Received: 1

Hello everyone, recently i 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 *

Im working on the ADXVMA study to keep a record of a particular instance and i just added two simple auxiliary functions.

 
Code
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:

 
Code
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:

 
Code
 
  SCFloatArrayRef Array = sc.Subgraph[0].Arrays[1]; 
 
  SCFloatArrayRef Price = sc.BaseDataIn[sc.Input[0].GetInputDataIndex()];
I would like to see any example or get any advice on how to work with any kind of auxiliary functions. I think that the variables aren't getting any value.

Any help would be appreciated!

Thxanks,

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Trade idea based off three indicators.
Traders Hideout
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks




Last Updated on December 15, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts