Support Board
Date/Time: Sun, 19 Jan 2025 15:16:44 +0000
Post From: SCDateTimeMS variables as persistent variables
[2018-04-07 11:51:52] |
User841591 - Posts: 42 |
I put SCDateTimeMS& LastAdjustmentDateTime = sc.GetPersistentDouble(1); in order store the time with millsecond in LastAdjustmentDateTime but I got the compiler error as below. Pls help to solve the problem. SpreadTradeSys_V2.cpp: In function 'void scsf_SpreadTradeSys(SCStudyInterfaceRef)': SpreadTradeSys_V2.cpp:173:63: error: invalid initialization of non-const reference of type 'SCDateTimeMS&' from an rvalue of type 'SCDateTimeMS' SCDateTimeMS& LastAdjustmentDateTime = sc.GetPersistentDouble(1); ^ In file included from scstructures.h:79:0, from sierrachart.h:15, from SpreadTradeSys_V2.cpp:1: scdatetime.h:1767:8: note: after user-defined conversion: SCDateTimeMS::SCDateTimeMS(double) inline SCDateTimeMS::SCDateTimeMS(double DateTime) |