Support Board
Date/Time: Tue, 07 Jul 2026 02:33:40 +0000
[Programming Help] - SpreadSheet Entry and Exit formulas
View Count: 31
| [2026-07-06 20:33:36] |
| alexo2022 - Posts: 50 |
|
I have trading entry signal, and I need help formulating the stop, target and entry on the spreadsheet for example when I have signal to enter long, I want to enter buy limit of the high of the previous bar + 1 tick, stop will be on the low of the previous bar + 1 tick and target will be 5 points from entry point. for short will be the opposite sell limit at the low of the previous bar + 1 tick stop will be at the high of the previous bar + 1 tick and target will be 5 points from entry point. |
| [2026-07-06 22:21:52] |
| Sawtooth - Posts: 4336 |
|
I want to enter buy limit of the high of the previous bar + 1 tick,
I think you want a Buy Stop instead:J22: =C4+J21 J71: S sell limit at the low of the previous bar + 1 tick
I think you want a Sell Stop instead, and -1 tick instead:J24: =D4-J21 J73: S target will be 5 points from entry point:
J80: =5This works for both long and short. This offset is from the entry, in points, not ticks, and includes slippage if any. (Check 'Use Attached Orders' on the Trade Window.) For the Long Stoploss, you'll need to create a persistent value of the Low -1 tick of the signal bar, in a spare Formula Column, e.g. in P3: =IF(K3=1,D3-$J$21,P4) Then add the Trade Management by Study study, and reference SG6 of the Spreadsheet System for Trading study, and set 'Position Type' to 'Long Only'. In J81, set an initial Stoploss offset from entry, and the Trade Management by Study study will move it to the price in P3. For the Short Stoploss, you'll need to create a persistent value of the High +1 tick of the signal bar, in a spare Formula Column, e.g. in Q3: =IF(M3=1,C3+$J$21,Q4) Then add another Trade Management by Study study, and reference SG7 of the Spreadsheet System for Trading study, and set 'Position Type' to 'Short Only'. In J81, set an initial Stoploss offset from entry, and the Trade Management by Study study will move it to the price in Q3. Attached Orders: Study Controlled Targets and Stops If the Buy Stop/Sell Stop doesn't get filled, you need to use one of these examples to cancel it: Spreadsheet Example Formulas and Usage: Cancel Unfilled Working Order n Minutes After Entry Spreadsheet Example Formulas and Usage: Cancel an Unfilled Order After n Bars |
To post a message in this thread, you need to log in with your Sierra Chart account:
