Login Page - Create Account

Support Board


Date/Time: Thu, 28 Mar 2024 23:52:12 +0000



[User Discussion] - Offering To The Community: Brett's Multi-Function Trailing Stop

View Count: 8916

[2016-11-22 22:34:24]
bjohnson777 (Brett Johnson) - Posts: 284
In doing overnight trade tests, sometimes I've run into an odd intermittent bug that will exit the position when the chart is recalculated. It's been hard to trace down, but I think I've fixed it.

I also changed the default setting for "Price Input Bias" to "No". This only works well on low volatility symbols. For regular volatility, "HLC Avg" seems to work well. For high volatility, choose "Last" to get non-averaged data. As always, give the settings a test with your preferred trading style.
[2016-12-07 05:49:37]
bjohnson777 (Brett Johnson) - Posts: 284
Update:

Minor code update to the Multi-Function Trailing Stop to allow it to compile easier in the DLL. No function change.

Added a throttle to Trade Testing in post 7 to give it a little extra time when starting a new order.
[2017-12-13 06:30:50]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to compile with the new SC version.
[2018-08-07 23:58:19]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to compile with the new SC version.
[2018-10-02 20:10:58]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to compile with the new SC version.
[2018-10-23 01:03:28]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to compile with the new SC version.
[2020-07-10 19:42:26]
bjohnson777 (Brett Johnson) - Posts: 284
Minor update to compile with the new SC version.
[2021-06-12 15:49:45]
owendonk - Posts: 53
Hi Brett,
Is it possible to create a trailing stop that trails a % of the current profit of the trade? For example: Entry at 4200, when 4204 stop is 4203.25 (.8*4). When 4210 stop is 4208, etc.
[2021-06-12 20:05:31]
Willson - Posts: 176
Brett, Fabulous work/contribution. I am not yet able know where to import your latest work so it can be selected within SC. To learn to locate and use, what file should be imported? and should it be placed in Sierra data folder.
[2021-06-15 16:30:47]
bjohnson777 (Brett Johnson) - Posts: 284
Sorry for the delays... With my health problems, I've been on triple overload with absurd property taxes, having to buy a new house central air conditioner for Thursday, and not doing anything I'm supposed to right now...

owendonk: I'd have to dig into the source code a little more to see what's available. I run SC under WINE and it's barfing badly right now. I may need a reinstall. I'll try and look at that tomorrow.

Willson: Install/compile instructions are here on post 11:
Offering To The Community: Brett Johnson's Standard Tool Kit | Post: 114621
[2021-06-16 22:43:41]
bjohnson777 (Brett Johnson) - Posts: 284
owendonk: I do have a percent option in the settings screen. This is calculated from the entry price and then sets the trail normally. As far as "profit" goes and dynamically changing modes, not really. I'm not seeing an easy and safe way to do this. The main problem is the limited execution environment of a chart study. A chart study isn't running as a standalone program. The problem is keeping track of dynamic data and past triggers. It can be reset when changing chart modes, closing a chart, closing SC, losing SC during a windoze crash, losing SC if the power goes out, or anything that triggers a chart recalculation. When a chart study gets reset, it's like starting the program all over again from scratch with the dynamic data missing. I've already kinda pushed this Multi-Function Trailing Stop to the sane limit. There are ways of saving data to disk, but they would be a kludge inviting disaster. Trying to program safteys and checks around the kludge would take a lot of time and effort and make this chart study far heavier than it already is. To be clear, this is a common problem of any charting program. SC is more flexible than most, so this study is possible here where it might not be in a lesser charting program.

As an example, if you've watched the trail line being drawn on a 1 minute chart, sometimes a reset will redraw the line in a slightly different way, or sometimes the line will disappear and start again from the current tick. There could also be a "catch up jump" on the next bar tick.
[2022-07-10 07:43:15]
bjohnson777 (Brett Johnson) - Posts: 284
Bunch of minor fixes to compile with SC 2411.

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

Login

Login Page - Create Account