Support Board
Date/Time: Sat, 10 May 2025 01:08:37 +0000
Post From: Spreadsheet Auto Trader : Cancel Working Orders [J27]
[2015-12-22 16:14:36] |
UserNameTodd - Posts: 4 |
My design intent: a signal is generated and sends a working parent order (price level from J22 or J24) that is based on a Chart Trader configuration with defined child Target and Stop OCO. If the condition on the next bar is "TRUE" in J27, I want the working order cancelled. This next bar also creates a signal to place a newly priced working order in the same direction as the first signal at the new price level of either J22 or J24. The net effect is to move the working order as the price moves and as long as the other studies are in agreement. In other words: let's say a signal is generated and working sell order is placed -5 ticks from the high of the current bar "H-5". On the next bar, a higher high +2 ticks prints and a new sell signal is generated. The existing order needs to be cancelled (J27 remains TRUE) and the new working order placed at "H-5" which ends up 2 ticks higher than the prior order. But this is not happening. What I thought to be relevant settings: Reset Condition on New Bar = TRUE Allow Multiple Entries in Same Direction = False Signal Only Once Per Bar = False What I'm seeing: when the order signal is triggered a working order is placed. This also sets J27 TRUE but the working order remains - which is what I want. If the next bar generates a new order signal (same direction) for an updated price location AND J27 remains TRUE, the first working order is not cancelled and remains in place. This working order remains at the first signal location as long as J27 remains TRUE until filled even though new order signal locations are generated - UNLESS (and here's what I don't understand) - one of the subsequent bars generates a condition to toggle J27 to False. At this point, the working order remains in place which is good. Then, if some bar later a new order signal is generated AND J27 then toggles from False to True, the first order is cancelled and a new working order is placed at the desired price. Is this logic for the "toggle" on J27 correct? My thought/hope was that by setting "Reset Condition on New Bar = TRUE" the signaled working order would cancel and be replaced with the new price level. Suggestions? Errors on my part? More information needed? Thank you. |