Login Page - Create Account

Support Board


Date/Time: Mon, 24 Feb 2025 21:10:44 +0000



[Programming Help] - "Cancel an Unfilled Order After n Bars" prevents from placing the limit order

View Count: 1029

[2021-03-23 17:11:39]
Trade-Mekoome - Posts: 7
Hello!
I'm teaching and testing spreadsheet trading system and have some issue:

I created a rule for Sale entry in M3 cell
Changed "Sell entry order type" to L J73 cell
Added rule to "Limit or Stop Price - Sell Entry (M)" in J24 (E3+0.4) or last price + 0.4

Everything works fine on test - after sale entry alert appering Limit order is being placed by last price + 0.4 - GOOD.

But I need those orders to automatically cancel after 10 bars and I did like it was written in your manual here:
Spreadsheet Example Formulas and Usage: Cancel an Unfilled Order After n Bars

added to Q3 : =IF (M3, 1, Q4 + 1)
and to J27: =OR(AND(P4 >= H4 + 1, J4 > 0), AND(Q4 >= H4 + 1, J4 < 0))
and to H4 added 10

And nothing works. Sale entry rule working and shows arrows on chart, but no any order is being placed, just like there is no any rule to place an order. I even can not place any order manually from Chart DOM - nothing happens when I press the button.
When I delete the rule from Q3 OR change "Sell entry order type" to M in J73 cell everithing returns to work - orders are being placed at Market price.

I use Volume per bar chart

Please tell me what is wrong, because I can not test the system at all.
[2021-03-23 20:18:01]
Sawtooth - Posts: 4174
Check these:
- Go to Trade >> Trade Service Log to see if there is an explanation.
- Formulas in K3, J22, and P3, or support reversals could be interfering.
- Referencing row 3 in J22/J24 will use the current intrabar value.
To use a close-of-bar value, reference row 4:
=E4+0.4
[2021-03-24 07:53:46]
Trade-Mekoome - Posts: 7
Hello. Have now checked and tested all possible variations.
-I don't have any formulas in K3, J22, P3 - only Sell Entry side formulas
- Changed J24 to =E4+0.4
- No any info about orders in Trade service log - just like this:
TradeActivity files query time: 0.019929 seconds. Entries: 0. Current queries: 1 | 2021-03-24 09:44:04.789
TradeActivity files query time: 0.000061 seconds. Entries: 0. Current queries: 2 | 2021-03-24 09:44:04.793
TradeActivity files query time: 0.004983 seconds. Entries: 0. Current queries: 1 | 2021-03-24 09:44:04.798
TradeActivity files query time: 0.009866 seconds. Entries: 0. Current queries: 1 | 2021-03-24 09:45:12.385

-Changed Sell entry formula to be as easy as possible: =E4>298
-Changed chart to 2 min bars and turned off Numbers bars study

No reaction at all... Could you please just test from your side?
[2021-03-24 11:52:21]
Sawtooth - Posts: 4174
I am just a user; I am not SC Support.

I cannot test your system, I can only suggest some things to check.

Check everything in this list:
Spreadsheet Systems, Alerts and Automated Trading: Ignored Signals With Spreadsheet Systems or Alerts

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account