Support Board
Date/Time: Tue, 26 Nov 2024 05:30:29 +0000
Post From: ACSIL programming assistance request
[2024-01-05 05:17:33] |
User183724 - Posts: 183 |
thanks for the reply(S) i made the recommended changes. the only difference i noticed when using sc.AddMessageToLog(MessageString, 1); instead of sc.AddMessageToLog(MessageString, 0); is the 1 forces the message log to open where i have to open the message log if i use the 0. the change didnt appear to have any bearing my problem. my latest code follows... my original code is commented and the changes were included 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; 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); MessageString.Format("Subgraph_ZigZag1 %.02f sc_Index %d" , Subgraph_ZigZag1[sc.Index], sc.Index); // sc.AddMessageToLog(MessageString, 0); sc.AddMessageToLog(MessageString, 0); end of code below is the last 3 lines of my message log. the only difference is the formatting ... thanks User719512 Chart: MESH24-CME [C][M] 1500 Volume #4 | Study: Custom DLL Study | Subgraph_ZigZag1 0.00 sc_Index 2642 | 2024-01-04 23:06:27.279 Chart: MESH24-CME [C][M] 1500 Volume #4 | Study: Custom DLL Study | Subgraph_ZigZag1 0.00 sc_Index 2642 | 2024-01-04 23:06:28.687 Chart: MESH24-CME [C][M] 1500 Volume #4 | Study: Custom DLL Study | Subgraph_ZigZag1 0.00 sc_Index 2642 | 2024-01-04 23:06:31.972 the problem appears to be the subgraph isnt populating. I ran other studies with the message log code on them and they work as they are supposed to so Im kind of stumped if you have a working example please share. thanx |