Support Board
Date/Time: Thu, 10 Jul 2025 04:50:44 +0000
Post From: ACS_Source\TradingSystemBasedOnAlertCondition.cpp and new Flatten OrderActionOnAlert
[2023-03-04 01:18:36] |
User719512 - Posts: 316 |
Hi Sierra, Looks like you added this new Flatten OrderActionOnAlert recently. Shouldn't this new block be setting Subgraph_BuyEntry/Subgraph_SellEntry if there was a position to be flattened? Possible missing code in your sample code. else if (Input_OrderActionOnAlert.GetIndex() == 4)// Flatten { if (PositionData.PositionQuantity < 0) { Subgraph_BuyEntry[BarIndex] = 1; Subgraph_SellEntry[BarIndex] = 0; } else if (PositionData.PositionQuantity > 0) { Subgraph_BuyEntry[BarIndex] = 0; Subgraph_SellEntry[BarIndex] = 1; } if (IsTradeAllowed && StateHasChanged) |