Login Page - Create Account

Support Board


Date/Time: Wed, 15 May 2024 13:26:56 +0000



[Programming Help] - Auto-Trading Spreadsheet System with Multiple Entries and auto-adjusted Stop(s)

View Count: 2351

[2017-05-01 05:32:16]
User637433 - Posts: 2
I am trying to figure out if there is a way to program a Spreadsheet System for autotrading that knows I am already currently in a position (that I may have entered manually) and would then ADD Multiple Entries at prices I Pre-Define and Then Sierra Automatically would adjust a Trailstop on the Overall position based on the added contracts. I might want the option of pre-defining various entries using actual price points or touched ID.SG that I define.

Example-1: I am Long 2 contracts from 108.00 (a trade I manually entered) and I activate Autotrade and it sees I am currently in a position.
Autotrade would then add (Buy) 2 more contracts if Price Touches 108.20 and automatically adjust my stop to Position Breakeven +1 tick (108.11)
Autotrade would then add (Buy) 3 more contracts if Price Touches 108.50 and automatically adjust my stop to Position Breakeven +3 ticks (108.28)
I may want to keep adding at my defined price points and contract amounts above the market and the Stop automatically adjusts.

Example-2: Autotrade triggers a trade based on my indicator criteria (maybe MA CROSSFROMABOVE) and I become Short 2 contracts from 108.90
Autotrade would then add (Sell) 2 more contracts if Price Touches ID3.SG2 and automatically adjust my stop to Position Breakeven -1tick (108.82)
Autotrade would then add (Sell) 3 more contracts if Price Touches ID4.SG1 and automatically adjust my stop to Position Breakeven -3ticks (108.68)
I may want to keep adding Sell Shorts at my various defined Indicator or Price Touched Points and contract amounts below the market and the Stop
is automatically adjusted. If I can't code various different Custom trailstops, then I would want the system to keep trailstop to Position
Breakeven -3 ticks ~ So there theoretically would always be 3 ticks of protected profit on the overall changing position.
[2017-08-13 21:05:33]
MichaelPPTF - Posts: 68
Hi there,

I am trying to accomplish the same thing, too. One aspect that I look at it - is to use Attached Orders. However, if you are to use Attached Orders, your exit configuration formula in the spreadsheet system will no longer be accepted.

For example, if you are using VWAP to define your stop and would like to have the Attached Orders to move the stop to breakeven if the trade goes your way. Once Attached Orders function is activated - even if it is not triggered, it will no longer accept the exit formula which uses VWAP as your exit.

I would like Sierra's input in this issue.
[2017-08-14 16:17:45]
Sawtooth - Posts: 3997
if you are to use Attached Orders, your exit configuration formula in the spreadsheet system will no longer be accepted.
This is not entirely true.
You can combine Attached Orders and L3, N3 formulas, but the first to trigger to a flatten exit takes precedent.
And you will want to set 'Cancel All Working Orders On Exit' to Yes.

If you want to trail or move a stop based on a formula, use a standard bracket Attached Order, then use the Trade Management By Study study, referencing a Formula Column, to move the stop. This is the most reliable way to do it.
[2017-08-14 16:28:17]
Sawtooth - Posts: 3997
I am trying to figure out if there is a way to program a Spreadsheet System for autotrading that knows I am already currently in a position (that I may have entered manually) and would then ADD Multiple Entries at prices I Pre-Define and Then Sierra Automatically would adjust a Trailstop on the Overall position based on the added contracts. I might want the option of pre-defining various entries using actual price points or touched ID.SG that I define.
If you have 'Support Scale In' checked, where each additional entry uses the same stop, you can use the Trade Management By Study study, referencing a Formula Column, to move the Attached Orders' stop. (The Trade Management By Study study will only move the stop closest to the current price, so it can't deal with multiple stops.)
You'll want to use a standard bracket Attached Order, not one of the trailing stops.
Attached Orders: Study Controlled Targets and Stops
[2017-08-17 18:47:22]
Sierra Chart Engineering - Posts: 104368
. One aspect that I look at it - is to use Attached Orders. However, if you are to use Attached Orders, your exit configuration formula in the spreadsheet system will no longer be accepted.

For example, if you are using VWAP to define your stop and would like to have the Attached Orders to move the stop to breakeven if the trade goes your way. Once Attached Orders function is activated - even if it is not triggered, it will no longer accept the exit formula which uses VWAP as your exit.
This is not true. This is already very well supported and documented:
Spreadsheet Systems, Alerts and Automated Trading: Initiating Trades with Auto-Trading and Using Manual or Attached Orders Exits
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:

Login

Login Page - Create Account