Login Page - Create Account

Support Board


Date/Time: Fri, 29 Nov 2024 23:52:22 +0000



Post From: When scaling in, Attached Orders only sent on first entry

[2023-01-10 15:52:31]
User500500 - Posts: 16
How to avoid a pending attached child order (Take Profit) to be placed before the parent order gets filled?

Context:
With ACSIL, I am using the function
sc.GetTradePositionForSymbolAndAccount(PositionData, SymbolToTrade, TradeAccount); & NewOrder.Target1Offset = Tticks * sc.TickSize;

Scenario A: SymbolToTrade = Symbol of the chart on which the system/study is applied
Result: Pending Child Order Sent Correctly --> only placed after "parent" order gets filled (proper OSO)

Scenario B: SymbolToTrade != Symbol of the chart on which the system/study is applied
Result: Expected Pending Order is mistakenly sent by Sierra Chart as a main order regardless of the "parent" being filled or not (not OSO)

I read in documentation that only 1 SL and/or 1 TP can be placed when using GetTradePositionForSymbolAndAccount() but not understanding why the TP is not sending as TP..
Important I resolve this otherwise the study keeps shooting target orders before their parent orders --> end up accumulating position in opposite direction as intended

Any help or insight is appreciated!
Date Time Of Last Edit: 2023-01-10 15:54:59