Support Board
Date/Time: Fri, 29 Nov 2024 03:29:59 +0000
ACS_Source\TradingSystemBasedOnAlertCondition.cpp and new Flatten OrderActionOnAlert
View Count: 369
[2023-03-04 01:18:36] |
User719512 - Posts: 267 |
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) |
[2023-03-04 12:28:27] |
User90125 - Posts: 715 |
Would be nice if SC also added Flatten to the TradingSystemStudySubgraphCrossover code as well.
|
[2023-03-04 21:28:03] |
Sierra_Chart Engineering - Posts: 17218 |
No, it is considered a different category than what those Subgraphs are used for. You can modify the study though to meet your requirements. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2023-03-04 21:28:13
|
[2023-03-04 22:41:24] |
User90125 - Posts: 715 |
No, it is considered a different category than what those Subgraphs are used for.
But those subgraphs that are used for Buy Exit/Sell Exit could also be used to Flatten a position in either Trading study. You can modify the study though to meet your requirements.
Understood. However, it would benefit ALL traders if SC made these adjustments readily available for everyone. |
To post a message in this thread, you need to log in with your Sierra Chart account: