Login Page - Create Account

Support Board


Date/Time: Sat, 18 Jan 2025 19:21:53 +0000



[User Discussion] - Spreadsheet Entries and Exits

View Count: 1480

[2018-02-26 20:22:33]
User241198 - Posts: 6
Is it possible for a Spreadsheet to Autotrade and send to the market a Stop-Limit Entry and a Market Exit?

I want the values of these orders to be sent only on the open of a new bar as follows:
• Buy Entry = (SD0.ID2@3 + 4*(J21)) [Must be a Buy-Stop Order]
Buy Exit = (SD0.ID3@3 - 4*(J21)) [Must be a Market Stop Order]

• Sell Entry = (SD0.ID3@3 - 4*(J21)) [Must be a Sell-Stop Order]
Sell Exit = (SD0.ID2@3 + 4*(J21)) [Must be a Market Stop Order]

Also, is it possible to cancel these orders if the Market-Stop order price is traded before the Stop-Limit price is traded?

Is it possible to reset the Market Stop orders to B/E after entry and has traded a target of 4*(J21)?

Any help, guidance, references or links are appreciated.
[2018-02-26 22:06:51]
Sawtooth - Posts: 4154
Yes, all of this is possible with the Spreadsheet System for Trading study, and the Trade Management by Study study.

It is too detailed to share exactly how in this venue, but here is an overview:
-Use cells K3 and M3 to trigger the entries.
-Use cells J22 and J24 to set the Buy/Sell Stop entry prices.
-Use cells J71 and J73 to set the order type to S.
-Use cell J27, or J78, to cancel unfilled working orders.
-Use the Trade Window's Attached Orders config to place the target offset at 4 ticks and the stop offset to n ticks, with a move to breakeven offset.
-Use Formula Columns to create persistent variables of the stoploss prices.
-Use two instances (one for longs and one for shorts) of the Trade Management by Study study to move the Attached Order's n stoplosses, referencing the persistent variables.

Here are some links to get you started:

Attached Orders: Study Controlled Targets and Stops
Spreadsheet Systems, Alerts and Automated Trading
Spreadsheet Example Formulas and Usage
Date Time Of Last Edit: 2018-02-27 13:58:26
[2018-02-27 09:24:37]
User241198 - Posts: 6
Much Thanks.
This might take me some time to sort out. The two instances of the Trade Management Study is new to me.
Thanks again

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

Login

Login Page - Create Account