Support Board
Date/Time: Fri, 31 Jan 2025 11:55:32 +0000
Stop Loss and Profit Target lines disappear without price reaching them
View Count: 1579
[2019-05-03 21:51:35] |
Blue Brazilian - Posts: 42 |
In my automated trading study, when a trade setup is identified at the close of a bar, I create (in the case of a short trade) a sell limit order at the closing price of the signal bar and a sell stop order at a price 1 tick below the close of the signal bar. A profit target and a stop loss are set on each of these orders, together with a move of the stop loss to break even after a move of several ticks in the direction of the trade. In most cases, this works correctly. Lines are displayed on the chart at the profit target and stop loss levels for each order, and trades exit when price reaches either the profit target or the stop loss. However, in a few cases, where both the limit and stop orders have been filled, and price has not yet touched the stop loss, profit target, or break even level, the lines for profit targets and stop losses disappear, but the position quantity remains at -2, and the trade never exits, even when price subsequently hits either the original stop loss or profit target. The only clue I have is that when the orders are filled for the sell entry, the position quantity is set to -2 and the PositionData.WorkingOrdersExist is set to 1, with the PositionData.PositionQuantityWithAllWorkingOrders shown as 0, so I assume the working order is for the stop loss and/or profit target. When the lines disappear, the PositionData.WorkingOrdersExist is set to 0 with the PositionData.PositionQuantityWithAllWorkingOrders shown as -2. However, the LastFillDate still points to the original sell entry, and the LastExitDate still refers to the preceding trade, so it would appear that no order has been processed during the removal of the stop loss and profit target. I would appreciate any guidance on what type of situation might cause these events, or what else I can check that might indicate where the problem lies. Date Time Of Last Edit: 2019-05-03 21:53:51
|
[2019-05-04 03:12:13] |
Sierra Chart Engineering - Posts: 104368 |
All of this detail is not necessary. The only explanation is the orders expired. Refer to: Trade Simulation: Time In Force for Trade Simulation Mode Make sure to use good till canceled for the time in force for them. 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, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2019-05-04 03:12:31
|
To post a message in this thread, you need to log in with your Sierra Chart account: