Login Page - Create Account

Support Board


Date/Time: Wed, 08 May 2024 00:30:24 +0000



Spreadsheet auto trading - trailing stop

View Count: 2001

[2014-01-03 19:11:00]
djcurcio - Posts: 236
Can you please provide some examples of how to implement trailing stops within a spreadsheet.
Thanks
[2014-01-03 21:02:51]
vegasfoster - Posts: 444
What do you want to use as the basis for the trail, a study or price?
[2014-01-04 12:40:06]
djcurcio - Posts: 236
Was thinking of having work like the trailing stops on the Sierra order panel - by price
Thanks

[2014-01-04 23:18:09]
vegasfoster - Posts: 444
Hmmm, ok, here is the problem with using a spreadsheet for that, assume you are setting a trailing stop for a long entry, if you enter within the bar and your stop is also within the extents of the entry bar, then there is no way to preserve the high price after entry, i.e. you can't create persistency within the same bar using a spreadsheet study (at least not that I know anyway). You could use the high of the bar, but if the high of your position is less than the high of the bar then you will get erroneous results.

You could do it using the maximum open profit and open profit figures if you are all in and all out on each trade. This would not work reliably if you were scaling in and out or if you had a partial fill on your exit. Are you all in and all out each trade?
Date Time Of Last Edit: 2014-01-04 23:20:56
[2014-01-05 06:35:08]
djcurcio - Posts: 236
Thanks for the info. I've been using the SuperTrend (ATRs) as a starting point.
And assume no scaling in but possible scaling out.
My problem with the SuperTrend is that it does not display or allow me to control the initial stop loss level or scaling out.
I'd like to have a bit more control / knowledge of the stop loss level. For example, I would like to be able to set the initial stop loss at 13 tics and once the position is profitable by 1 tic have the stop moved up (or down when going short) as the trade goes my way to minimize the potential loss and eventually set an emergency exit to breakeven (entry plus 1 tic). I'd like to have a set initial profit target level user setting (for example 11 tics).
I'd like to have the profit level work with a scale out function so that if the position was 2 contracts, that 1 contract would be scaled out at the profit target, and the remaining position would then be able to run with the trailing stop. The number of contracts is a variable (not just 1 or 2), and the number of contracts that are scaled out at the first point should be a user variable - for example if the initial contracts are 3, I should be able to scale out 1 at the first profit target and let the remaining two run, or if I set the initial position to 5 and have 2 scale out and let the remaining 3 run, etc.
I assume that there are no partial fills on exits.
Thanks again



[2014-01-07 01:54:39]
vegasfoster - Posts: 444
Sorry, that's too complicated for my original idea. I think you should try using the attached orders, if not maybe someone else can help.

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

Login

Login Page - Create Account