Login Page - Create Account

Support Board


Date/Time: Sat, 14 Nov 2026 03:13:46 +0000



Only partial position exit on Buy/Sell Exit Signal from Spreadsheet for Trading

View Count: 428

[2026-08-26 11:12:01]
User512353 - Posts: 198
SC2944
SC_Data trade simulation mode

Using 'Spreadsheet System for Trading' Study.

When the system is long or short with several positions, on SOME occasions, when the respective Buy/Sell Exit column flips to 1, NOT ALL positions are exited.

The signal that I am using for the Buy/Sell Exit column is very volatile and may be triggered only for a very short time, e.g. shorter than the bar period (and maybe also shorter than the chart update interval (which I cannot prove)).

My expectation is, that IF an Exit is triggered, then it would exit ALL positions, not just a subset.
However, this obviously is not the case.

Is this a bug or feature?
[2026-08-26 11:14:40]
User512353 - Posts: 198
A screenshot of the behavior, where the system needs several triggers to exit all positions.
imageScreenshot From 2026-08-26 11-13-08.png / V - Attached On 2026-08-26 11:14:32 UTC - Size: 11.14 KB - 77 views
[2026-08-26 13:04:30]
User512353 - Posts: 198
A more dramatic screenshot.
You can see where the first exit was triggered, but only for 1 position.
Would have been a nice trade if ALL positions had exited.
But the triggers only fired for 1 (or few) positions.
The bulk was probably cancelled on a reversal. Would have to look at it in detail.
imageScreenshot From 2026-08-26 12-59-03.png / V - Attached On 2026-08-26 13:04:27 UTC - Size: 34 KB - 71 views
[2026-08-26 14:17:30]
Sawtooth - Posts: 4361
One possibility:
The exit quantity uses J26 unless J82/J83 are active.
[2026-08-26 14:35:16]
User512353 - Posts: 198
Yes, this seems to be the problem.
But I wonder how this came to be.
I suspect that it results from old values remaining when switching the spreadsheet to v2 values.
E.g. v2:J69=1, v2:J70=0, v2:J71=M (!?!?) was what I found.
When I set v2:J70=1, v2:J71=<blank> the problem disappears.

This was the first time I ever used v2 values.
Maybe this explains why I never had such problems before.
The v2:J71=M definitely looks malignant.

Thanks, Sawtooth!
[2026-08-26 14:54:51]
Sawtooth - Posts: 4361
My opinion on v2:
https://www.sawtoothtrade.com/blog
[2026-10-24 18:35:02]
User512353 - Posts: 198
I need to come back to this again.
I thought that the problem was solved when setting
v2:J70=1, v2:J71=<blank>

Documentation says:

Exit Order Quantity (write-only) [v1:J83, v2:J71]
[...]
If the cell is empty or 0 during a Buy Exit or Sell Exit, then the quantity is determined by the automated trading logic and the end result is that the Trade Position for the Symbol and Trade Account the automated trading system is for will be flattened.


This does not always work:
In the attached screenshot you can see a case where 6 short positions were active (this was a simulation run at speed=2, calculate at every tick/trade).
One position exited via a child stop order (the first exit at the red candle before the candle with the absolute low).
The Sell Exit trigger was set on the 4th candle after the candle with the absolute low, as seen by the small red right arrow at the low of that candle.
The exit execution was then on the next candle, but only for 1 position.
The rest of the positions was exited via child stop orders or reversal.

Do I still have a wrong setup?
Or is this a bug in SC, that not all positions are flattened?
Date Time Of Last Edit: 2026-10-24 18:47:16
imageScreenshot From 2026-10-24 18-16-25.png / V - Attached On 2026-10-24 18:22:27 UTC - Size: 12.71 KB - 22 views
[2026-10-24 18:51:45]
User512353 - Posts: 198
The attached screenshot features another very obvious case.
Here the Buy Exit trigger was set at the 3rd candle after the candle with the absolute high, as can be identified by the small green left arrow at the top of that candle.
Again, only one position exited there.
The other exits after that are all from child stop orders. And 2 long positions are still active.
imageScreenshot From 2026-10-24 18-45-39.png / V - Attached On 2026-10-24 18:50:41 UTC - Size: 20.5 KB - 25 views
[2026-10-24 19:54:43]
Sawtooth - Posts: 4361
Doubtful there is a bug.

One possibility for missed exits:
A TRUE must go FALSE before a new trigger can occur.
A TRUE that never goes FALSE will not trigger again.
Signals only occur when FALSE transitions to TRUE.

You can set 'Reset Condition On New Bar' to Yes, but this will not affect intrabar signals.
[2026-10-26 13:25:42]
John - SC Support - Posts: 48527
We tested this and are not seeing any issue. We also specifically tested when increasing the position with multiple entries and then exiting with "Use Separate Exit Order Quantity (write-only):" set to "1" and "Exit Order Quantity (write-only):" blank. And when the exit signal occurs, the full quantity of the position is closed.

So we do not know why you are seeing something different.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-11-06 17:26:47]
User512353 - Posts: 198
There are more strange things observable with spreadsheets.
This time it is about obscure entries.

Preliminary remarks:
1. In the spreadsheets used, a buy/sell can only occur if a) v2:J34>0, i.e. not in a losing position, and b) add-to-position can only occur if ID0.SG4@3>v2:J48 (for buy; '<' for sell), i.e. if market price is above/below last entry price.

Case 1 (screenshot 15:11 UTC):
During heavy volume in short time, SC started to "binge sell" over 120 contracts.
While the chart shows a sell signal from an ss/alert study, the actual ss/trade study conforms to remark 1 above, so no entry should be made.
During this specific event, I had the spreadsheet right in front of me, and M3 (sell entry) was 0 all the time.
However, strangely, M4 was 1 all the time, which cannot be explained either.
The sells occurred rapidly after another with multiple entries in one bar, which also should be impossible, because 'signal only once per bar' is active.

Case 2 (screenshot 15:52 UTC):
Similar case, this time with buy entries, but not that rapid as at 15:11.
The volume per time interval was lower here, but still high.
The entries should not occur because of remark 1 above.
It is not clear why SC executes these entries. The implemented logic is clearly opposing this.
And also no 1 can be observed in the K3 or M3 cells, except maybe for the very first entry.

Generally, these observations (the new ones here on entries, as well as the previously reported ones for exits) always occur during times where an extremely high volume is processed. The chart update interval was deliberately set to 250ms to slow down processing. I have set it to 30ms now and will observe further. The actual measured chart update time is 6ms.
Date Time Of Last Edit: 2026-11-06 17:28:35
imageScreenshot From 2026-11-06 15-11-03.png / V - Attached On 2026-11-06 16:59:51 UTC - Size: 10.1 KB - 15 views
imageScreenshot From 2026-11-06 15-52-38.png / V - Attached On 2026-11-06 16:59:57 UTC - Size: 12.64 KB - 15 views
[2026-11-06 17:49:35]
User512353 - Posts: 198
Also observed today: Unexplainable buy/sell exits.
No screenshot for this.
Similar to the non-explainable entries, but for exits.
E.g. in a short position while market is moving down, for apparently no reason an exit is triggered. Not observable on the spreadsheet, and not explainable by the logic.

Just to mention it.
[2026-11-06 18:19:09]
User512353 - Posts: 198
I have a suspicion, but I cannot confirm it:
The study/spreadsheet is loaded into multiple charts.
I suspect that the obscure behavior only occurs when the entry/exit decision logic includes cross-sheet references, i.e. Sheet1!...
[2026-11-06 20:03:07]
Sawtooth - Posts: 4361
I suspect that the obscure behavior only occurs when the entry/exit decision logic includes cross-sheet references, i.e. Sheet1!...
This may apply to your setup:
Referencing Other Charts in Spreadsheet Study Formulas: Referencing Other Charts in Spreadsheet Study Formulas
[2026-11-06 20:56:17]
John - SC Support - Posts: 48527
We also wonder if those entries/exits were actually created by the spreadsheet. Be sure to look at your Trade Activity Log and see if it shows the source of those trades as coming from the Spreadsheet.

Typically when we see a lot of orders being sent like this, it is due to a stuck key on the keyboard that is tied to a trading shortcut.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account