Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 05:36:47 +0000



Help: Mimic trading window multiple targets with stops in spreadsheet for trading

View Count: 128

[2024-09-13 02:09:39]
User484096 - Posts: 13
I need help with spreadsheet for trading to mimic the trade windows 3 targets with stop.

The target part is fine. It is the stop. It only close 1 part of the trade instead of exiting the trade. The Exit column turned 1 and stay as 1.

J26:
=IF(ABS(J8) = 3, 1, IF(ABS(J8) = 2, 1, IF(ABS(J8) = 1, 1, 0)))

Target 1: 1/2 ATR
Target 2: 1 ATR
Target 3: 2 ATR

Stop: 1 ATR
If Target 1 is hit, move stop to 1/2 ATR
If Target 2 is hit, move stop to +2 point or trail by previous bar.


The underlined is the stop logic.
Buy Exit:
=OR(AND($J$8 = 3, OR(ID0.SG4@3 > ($J$9 + ID9.SG1@4 * 0.5), ID0.SG4@3 < $J$9 - ID9.SG1@4)),
AND($J$8 = 2, OR(ID0.SG4@3 > $J$9 + ID9.SG1@4, ID0.SG4@3 < ($J$9 - ID9.SG1@4 * 0.5))),
AND($J$8 = 1, OR(ID0.SG4@3 > ($J$9 + ID9.SG1@4 * 2), MAX(ID0.SG4@3 < ($J$9 + 2), ID0.SG4@3 < ID0.SG3@4)))
)


Sell Exit:
=OR(AND($J$8 = -3, OR(ID0.SG4@3 < ($J$9 - ID9.SG1@4 * 0.5), ID0.SG4@3 > $J$9 + ID9.SG1@4)),
AND($J$8 = -2, OR(ID0.SG4@3 < $J$9 - ID9.SG1@4, ID0.SG4@3 >($J$9 + ID9.SG1@4 * 0.5 ))),
AND($J$8 = -1, OR(ID0.SG4@3 < ($J$9 -ID9.SG1@4 * 2), MIN(ID0.SG4@3 > ($J$9 - 2), ID0.SG4@3 > ID0.SG2@4)))
)
[2024-09-13 14:03:45]
John - SC Support - Posts: 36238
Your Order Quantity (cell J26) is always set to a value of 1. So when the Exit conditions are met, it will only close out a quantity of 1. You would need to add logic to your Order Quantity to make sure the quantity is at least the size of the order quantity should your stop conditions be met.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-09-13 17:17:28]
Sawtooth - Posts: 4118
You could use J82/J83 for your exit quantity, referencing J8 for the exit quantity.
When J82 is set to 1, J26 becomes only the entry quantity.

Spreadsheet Systems, Alerts and Automated Trading: Use Separate Exit Order Quantity [J82]

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

Login

Login Page - Create Account