I have about 10 instruments that I follow and I would like to have certain default input parameters for several studies automatically change depending on the instrument I currently have selected. For example, change Pivot point times based upon the symbol's RTH. Because the contract names change periodically I am trying to use wildcards after the first two letters of the symbols so I don't have to update the code every month.
I found a wildcard function here Wildcard string compare (globbing) - CodeProject (, but I am getting errors within the function that I don't how to resolve.
Any help would be appreciated. Thank you.
***** Starting Build of Custom Studies Source File: CCITest.cpp ***** 12:33:24
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(15): Warning! W665: col(40) temporary object used to initialize a non-constant reference
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(15): Note! N638: col(40) 'c_ArrayWrapper' defined in: sierrachart.h(1401) (col 7)
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(15): Note! N630: col(40) source conversion type is 'int'
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(15): Note! N631: col(40) target conversion type is 'c_ArrayWrapper (lvalue)'
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(15): Error! E210: col(40) returning reference to function argument or to auto or register variable
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(15): Note! N638: col(40) 'c_ArrayWrapper' defined in: sierrachart.h(1401) (col 7)
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(27): Warning! W665: col(40) temporary object used to initialize a non-constant reference
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(27): Note! N638: col(40) 'c_ArrayWrapper' defined in: sierrachart.h(1401) (col 7)
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(27): Note! N630: col(40) source conversion type is 'int'
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(27): Note! N631: col(40) target conversion type is 'c_ArrayWrapper (lvalue)'
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(27): Error! E210: col(40) returning reference to function argument or to auto or register variable
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(27): Note! N638: col(40) 'c_ArrayWrapper' defined in: sierrachart.h(1401) (col 7)
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(48): Warning! W665: col(24) temporary object used to initialize a non-constant reference
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(48): Note! N638: col(24) 'c_ArrayWrapper' defined in: sierrachart.h(1401) (col 7)
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(48): Note! N630: col(24) source conversion type is 'bool'
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(48): Note! N631: col(24) target conversion type is 'c_ArrayWrapper (lvalue)'
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(48): Error! E210: col(24) returning reference to function argument or to auto or register variable
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(48): Note! N638: col(24) 'c_ArrayWrapper' defined in: sierrachart.h(1401) (col 7)
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(86): Error! E899: col(21) cannot convert expression to target type
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(86): Note! N630: col(21) source conversion type is 'c_ArrayWrapper (lvalue)'
C:\SierraChart - Velocity\ACS_Source\CCITest.cpp(86): Note! N631: col(21) target conversion type is 'bool'
There were compilation errors.
***** Build Failed! ***** 12:33:26
#include "sierrachart.h"
SCDLLName("CCITest")
/*==========================================================================*/
SCFloatArrayRef wildcmp_S(const char *wild, const char *string)
{
// Written by Jack Handy - [email protected]
const char *cp = NULL, *mp = NULL;