Support Board
Date/Time: Thu, 03 Jul 2025 10:49:24 +0000
Post From: Request for ASCIL Code
[2024-02-02 13:21:05] |
emmanuel - Posts: 63 |
The position quantity is > 0 when there's a long position and < 0 when there's a short position. See Automated Trading From an Advanced Custom Study: s_SCPositionData Structure Members Use: if (PositionData.PositionQuantity != 0) `if (!ordersPlaced)` always returns false because the state of the `ordersPlaced` variable is not retained between invocations of the study function. Use a persistent variable instead: See ACSIL Interface Members - Functions: Persistent Variable Functions if (sc.SetDefaults) { ... // There are no bool persistent variables. Use an int. int& ordersPlaced = sc.GerPersistentInt(1); return; } |