Support Board
Date/Time: Sun, 24 Nov 2024 16:48:18 +0000
[Programming Help] - Spreadsheet Trading // Resolving edge case around entry immediately after a stop exit
View Count: 214
[2024-05-19 02:41:34] |
User203400 - Posts: 1 |
Hello, I'm using spreadsheet trading, and everything is working like I expect except for one edge case. Some background: I'm only using the spreadsheet columns for long entry and short entry, and I'm handling closing trades through the "use attached orders" options (for a stop and profit target). The "Alert/Signal Only Once per Bar" and "Signal Only on Bar Close" options are both set to yes/true. I'm using 5 minute bars. Here's the scenario that I need help with: Let's assume I'm in a short position (it could just as easily be a long position, it doesn't matter) and it get closed via my attached stop loss about 2.5 minutes into my 5 minute bar (so not at all near the close of the previous bar). However, the previous bar that closed satisfied my "long entry" criteria so even though I'm mid-way through a new bar, as soon as my position is closed out by the stop order, my system enters into a long position . . . I would prefer that it waited until the ongoing bar closed instead of just looking at the row 4 "long entry" criteria (which I think is related to my configuration of the "signal only on bar close" setting. Is there a way to solve this? Thanks! |
[2024-05-28 16:49:25] |
Sierra_Chart Engineering - Posts: 17156 |
If you cannot accomplish what you need with the Spreadsheet System for Trading study you will need to use ACSIL: Automated Trading From an Advanced Custom Study 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, use the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2024-05-28 16:49:37
|
[2024-05-29 14:53:20] |
Sawtooth - Posts: 4119 |
Is there a way to solve this?
Try this workaround:Set Signal Only On Bar Close to No, and edit all references one row higher, e.g. from row 3 to row 4, and from row 4 to row 5, etc. (Entries will be at the open of the next bar (same as close of current bar)). However, when you do this, arrows marking the entry bar will be one bar late. To place arrows at the entry bar: - Set the K3/M3 draw style to Hidden - Use 2 spare Formula Columns with the same entry formulas, but with row 3 references, and set the draw styles to the arrows. - To place the arrows correctly, use formulas like this: =IF(BuyEntryFormula,D3,0) =IF(SellEntryFormula,C3,0) |
To post a message in this thread, you need to log in with your Sierra Chart account: