Support Board
Date/Time: Fri, 31 Oct 2025 21:15:53 +0000
[User Discussion] - Spreadsheet alert/trading incorrect execution
View Count: 852
| [2017-05-11 01:35:13] | 
| User269983 - Posts: 31 | 
| I have a simple trailing system below. On long, it trail by the low of last 2 bars - 2 ticks, and for short, high of last 2 bars + 2 ticks. However, it is not working. The screenshots show the condition evaluated true when low of current bar is lower the than low of previous 2 bar. It should only evaluate true if the current low is lower than previous 2 bar by 2 ticks. On the example: 47.46 47.47 [-1] 47.47 [-2] 47.46 should be false. When it hit 47.45, then it is true. Buy Exit: =AND(J8>0, A3>J42, D3<(MIN(D4, D5) - 0.01)) Sell Exit: =AND(J8<0, A3>J42, C3>(MAX(C4, C5) + 0.01)) | 
|  SC-Spreadsheet.png / V - Attached On 2017-05-11 01:28:05 UTC - Size: 37.54 KB - 294 views  SC-Spreadsheet-details.png / V - Attached On 2017-05-11 01:28:08 UTC - Size: 14.33 KB - 255 views | 
| [2017-05-11 02:05:00] | 
| Sawtooth - Posts: 4281 | 
| In formula columns, you should use absolute references to J8 and J42: =AND($J$8>0, A3>$J$42, D3<(MIN(D4, D5) - 0.01)) | 
| [2017-05-11 04:53:22] | 
|  | 
| This is just a floating-point comparison issue. Change 0.01  to .015 Here is the relevant documentation: Using the Spreadsheet Study: Imprecision of Floating-Point Numbers and Comparisons 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, *change* to 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:
