Support Board
Date/Time: Tue, 26 Nov 2024 05:54:54 +0000
Post From: ACSIL programming assistance request
[2024-01-04 17:51:28] |
User183724 - Posts: 183 |
thx for your reply(s). I tried changing sc.Index to 0 and I tried adding the *01 but I have the same problem. the subgraph isn't populating or i've got something wrong with the message to log statement. Ive reduced my code to min (removed all the line generation lines) and posted it below. i did look at studies7.cpp example. its a non autoloop example and the rest of my study is autoloop so im trying to keep it all the same. from studies7.cpp.... case 1: sc.ZigZag( sc.BaseData[Input_DataHigh.GetInputDataIndex()], sc.BaseData[Input_DataLow.GetInputDataIndex()], Subgraph_ZigZagLine, CalcIndex, Input_ReversalPercent.GetFloat() * 0.01f, ZigZagStartIndex); thx tim code follows // The top of every source code file must include this line #include "sierrachart.h" // Name of the custom study. SCDLLName("ZigZag111") /*==========================================================================*/ SCSFExport scsf_ZigZag111(SCStudyInterfaceRef sc) { SCSubgraphRef Subgraph_ZigZag1 = sc.Subgraph[0]; if(sc.SetDefaults) { sc.AutoLoop = 1; sc.GraphRegion = 0; return; } float ReversalPercent = 0.5 * 0.01f; // change here for now as req sc.ZigZag(sc.BaseData[SC_HIGH], sc.BaseData[SC_LOW], Subgraph_ZigZag1, ReversalPercent, 0); // /* SCString MessageString; MessageString.Format("Subgraph_ZigZag1 %f sc_Index %d" , Subgraph_ZigZag1, sc.Index); sc.AddMessageToLog(MessageString, 0); // */ } /*==========================================================================*/ nothing follows |