| Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 3/16/2005 Posts: 26
|
I'm very new to Blocks 2.0 and see huge potential in this new product.
I'd like to test a trailing stop that works like the built-in price percent based trailing stop (8%) but uses units of Average True Range instead. This type of stop would work much better across a diverse set of stocks where some stocks in the list might be relatively slow movers and have an ATR as a percentage of a close around 1.5%, and others in the list might be more volatile and have an ATR as a percentage of the close be more like 4.5%. A straight percentage would be too tight for some and way too loose for others.
Can you help me by creating a trailing stop that works just like the built-in one but uses a 21-period front-weighted Average True Range and allows me to specify how many units of ATR I want it to trail the price once I've entered? (e.g. 3.0) I would want it to be dynamic and recalculate the ATR on each bar I'm in the trade and adjust its distance as the volatility in the stock changes from bar to bar going forward.
Thanks, Michael
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please download the attached .scond file to:
\My Documents\Blocks Files\Tool Parts\Strategy Conditions
Once downloaded, you should be able to select Add Condition | My Computer when adding a Strategy Condition to access it.
You can use QuickEdit to change the settings or view the Block Diagram.
The Trailing Stop is based on the High minus the Average True Range with a Width Multiplier. We can adjust it based on your feedback if it does not meet your needs.Attachments: TR Trailing Stop.scond - 6 KB, downloaded 396 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/16/2005 Posts: 26
|
Thanks much, Bruce! By the looks of the trade results, you've created exactly what I was after. One thing I notice is that it runs painfully slow relative to other strategy conditions I've tsted. Is there any way to optimize the algorithm and make it run faster?
Ragards, Michael
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The only thing I can think of to speed up to the Strategy Condition would be to add a Parameter: Length Limit Block to the Prices Block in the Block Diagram. You would want to make sure the value used equals or exceeds the number of bars required to generate the Test Period listed under Strategy | Settings | Test Period.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
 Registered User Joined: 5/31/2006 Posts: 377
|
Michael
to make it go faster remove the Moving agverage block and change time span of Average Trading Range block to 21.
marcj
QUOTE (ProfitaBull) Thanks much, Bruce! By the looks of the trade results, you've created exactly what I was after. One thing I notice is that it runs painfully slow relative to other strategy conditions I've tsted. Is there any way to optimize the algorithm and make it run faster?
Ragards, Michael
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
marcj, The only problem with that is ProfitaBull wants a Front Weighted Moving Average of True Range. Setting the Period of the Average True Range Block to 21 will provide a Wilder's Smoothed version instead.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/16/2005 Posts: 26
|
Actually, I'm not so hung up on front-weighted. I'd be fine with exponential or even a simple moving average. If it makes that much of a difference to the performance, I'm willing to cut a few corners here. Any kind of adjustable volatility-based trailing stop is better than a flat percentage.
Thanks, Michael
|
|
 Registered User Joined: 5/31/2006 Posts: 377
|
QUOTE (ProfitaBull) Actually, I'm not so hung up on front-weighted. I'd be fine with exponential or even a simple moving average. If it makes that much of a difference to the performance, I'm willing to cut a few corners here. Any kind of adjustable volatility-based trailing stop is better than a flat percentage.
Thanks, Michael
the ATR block is a simple moving average only. If you want more you have to use both blocks.
Have you run scans to prove the better performance of the weighted moving averages?
marc j
|
|

 Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
marcj, Actually, the Average True Range Block does not use a Simple Moving Average, it uses Wilder's Smoothing (also called a Simplified Moving Average).
ProfitaBull, I am not recommending one smoothing method over another. The trainers cannot give settings, interpretation or investment advice. The Wilder's Smoothing used by the Average True Range Block is the traditional smoothing method for an Average True Range.
The reason for setting the Average True Range Period to 1 and adding a Moving Average Block was to allow for the use of a Front Weighted Moving Average as smoothing instead. If Wilder's Smoothing works for you, there is no reason to not do as marcj suggests.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
|
Guest-1 |