Login Page - Create Account

Support Board


Date/Time: Thu, 13 Feb 2025 13:23:29 +0000



Can SC trail a stop N bars back, rather than at a fixed distance?

View Count: 923

[2020-12-09 21:31:52]
User203781 - Posts: 55
Or must I write this one myself? (I did search the forum, but none of the results seemed quite on target.)

A long trade might exit, for example, when price falls a tick below the previous bar.

Thanks.
[2020-12-09 22:30:10]
John - SC Support - Posts: 37916
One way to do this would be to use the Spreadsheet Formula to reference the previous bar that you want. Then use the Trade Management by Study study to control your Stop or Target based on the Spreadsheet Formula.

For example, let's say you have a Moving Average as your first study and you want the Stop to follow the Moving Average from 10 bars prior to the current bar. You would add the Spreadsheet Study and put in the following formula:
=ID1.SG1[-10]

Then in your Trade Management by Study you set the Controlling Subgraph Reference to the Spreadsheet Formula Study and setup the rest of the information as desired.

Refer to the following for the Spreadsheet Formula:
Spreadsheet Formula

And here for the Trade Management by Study study:
Attached Orders: Study Controlled Targets and Stops
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-12-09 22:55:59]
User203781 - Posts: 55
Many thanks! That's an enormous help.

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

Login

Login Page - Create Account