Support Board
Date/Time: Thu, 16 Jan 2025 02:48:24 +0000
Post From: SC Function to find trade position
[2017-09-27 22:18:15] |
User203925 - Posts: 40 |
My sc.Defaults are : sc.AllowMultipleEntriesInSameDirection = false; sc.AllowOnlyOneTradePerBar = true; sc.MaintainTradeStatisticsAndTradesData = true; sc.AlertOnlyOncePerBar = true; sc.SupportReversals = true; c.AllowEntryWithWorkingOrders = true; sc.CancelAllWorkingOrdersOnExit = true; I initial launch an order and a stop when certain conditions are met. Next, if another type of conditions are met I am launching a SCT_ORDERTYPE_TRIGGERED_TRAILING_STOP_3_OFFSETS as a BuyExit or SellExit depending on the entry needed. This works great bc the Trailing Stop will launch with sc.AllowMultipleEntriesInSameDirection = false. The issue is that when a reversal condition is met. The order cancels out the reversal order if the trailing stop did not close out the initial order. I need to have sc.AllowMultipleEntriesInSameDirection set to false bc if not my system will launch multiple entries. If I try to use sc.GetTradePosition and require the entry to launch if sc.GetTradePosition = -1 meaning it's not in a trade then my entries will not reverse bc it's in a trade when the reversing entry is launched. If I change SCT_ORDERTYPE_TRIGGERED_TRAILING_STOP_3_OFFSETS to a BuyEntry / SellEntry the orders will not launch bc I have sc.AllowMultipleEntriesInSameDirection set to false. Any suggestions? I feel like I am running in circles. |