Support Board
Date/Time: Tue, 26 Nov 2024 04:52:06 +0000
Post From: Liquidation ACSIL
[2024-01-04 15:58:56] |
ForgivingComputers.com - Posts: 960 |
int& TradeFlattened = sc.GetPersistentInt(0); // reset to zero when in a trade // Set Liquidation Time int Hour = 19; int Minute = 0; int Second = 0; SCDateTime liquidationTime = SetTime(HMS_TIME(Hour, Minute, Second); // Get Current Date Time SCDateTime CurrentDateTime; CurrentDateTime = sc.CurrentSystemDateTime; // Get Current Time SCDateTime CurrentTime; CurrentTime = CurrentDateTime.GetTime(); // flatten if liquidation time if(TradeFlattened == 0 && CurrentTime >= liquidationTime && CurrentTime < liquidationTime + SCDateTime::SECONDS(1)) { sc.FlattenAndCancelAllOrders() TradeFlattened = 1; } |