Support Board
Date/Time: Fri, 27 Dec 2024 18:08:08 +0000
Post From: sc.UpdateStartIndex == 0 condition when running a autotrade system replay backtest
[2016-02-27 17:38:23] |
@sstfrederik - Posts: 404 |
When I start a replay backtest the condition sc.UpdateStartIndex == 0 is seen many times. The study is in manual loop. I would not expect that. I intend to do a few things only once when the study is loaded and sc.UpdateStartIndex == 0 When doing a backtest this does not seem to work and this part of my code gets called way to much to be efficient. Any suggestions? Thanks. #include "sierrachart.h"
SCDLLName("Test DLL") SCSFExport scsf_Test(SCStudyInterfaceRef sc) { if (sc.SetDefaults) { // Set the configuration and defaults sc.GraphName = "Test Study"; sc.StudyDescription = "This is a test study function"; sc.AutoLoop = 0; // During development set this flag to 1, so the DLL can be modified. When development is done, set it to 0 to improve performance. sc.FreeDLL = 1; return; } // Do data processing if (sc.UpdateStartIndex == 0) { sc.AddMessageToLog("UpdateStartIndex = 0", 1); } if (sc.Index == 0) { sc.AddMessageToLog("Index = 0", 1); } } |