Support Board
Date/Time: Sun, 02 Feb 2025 22:01:41 +0000
Post From: Buy Exit not Triggering Fills
[2018-05-08 15:38:33] |
User172040 - Posts: 70 |
I know SC does not accommodate specific formula questions. I'm merely asking a general one. I'm coding my Buy Exit in the spreadsheet study and I'm using the documented examples from here - Spreadsheet Systems, Alerts and Automated Trading: Multiple Exit Automated Trading Example and here - Spreadsheet Systems, Alerts and Automated Trading: Buy Exit (column L) All I want to do is to trade 2 contracts (J26 Formula). If price = avg price + 20 points take off 1 contract. If price = avg price + 40 points take off the last contract. If price = avg price -10 points exit or if closing price on row 3 is smaller than low of row 6 then exit or if 5MA cross 9MA from above, then exit. Problem is, when I backtest and 'Use attached orders' are disabled (so L column will be used for exits) then I get no actual fills on the backtest. But I also get no kind of error on any of these formulas. When I clear L column (no formulas) and tick 'Use attached orders' I get my fills and exits in the backtest. Why would I not get fills on the backtest when entering buy exit criteria? Below the basic formula I'm using J26 (Order Quantity): =IF( ABS(J8) = 2, 1, IF( ABS(J8) = 1, 1, 0)) L3: =OR(AND($J$8 = 2, ID0.SG4@$3 - $J$9 > 20, AND($J$8 = 1, ID0.SG4@$3 - $J$9 > 40), OR(ID0.SG4@$3 <= $J$9-10, ID0.SG4@3 < ID0.SG3@6, CROSSFROMABOVE(ID3.SG1@3:ID3.SG1@4,ID3.SG2@3:ID3.SG2@4)))) |