BullCharts Forum Homepage
Forum Home Forum Home > BullCharts > Tips and Tricks
  New Posts New Posts RSS Feed: Trailing Stops in TradeSim scans
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Trailing Stops in TradeSim scans

 Post Reply Post Reply
Author
Message Reverse Sort Order / View First Unread Post
sonu panwar View Drop Down
Newbie
Newbie
Avatar

Joined: 27 Feb 2010
Location: india
Posts: 5
Post Options Post Options   Quote sonu panwar Quote  Post ReplyReply Direct Link To This Post Topic: Trailing Stops in TradeSim scans
    Posted: 27 Feb 2010 at 5:08pm

Here’s a great article on back testing from our good friend [tag]David Jenyns[/tag], author of the [tag]MetaStock Programming Study Guide[/tag], available for purchase at: www.metastock.ca/training/metastock-programming.aspx

+-+-+-

Original Article: www.makeupblog.cn/real-estate/the-secret-art-of-backtesting.html

The Secret Art of [tag]Backtesting[/tag]

If you have not back tested your trading system, you might as well trade with your eyes close.

In fact, whatever technical analysis criterion you use to trade with, be it [tag]moving averages[/tag], [tag]candle sticks[/tag], [tag]volatility breakouts[/tag], [tag]fibonacci retracements[/tag] or any other [tag]trading system[/tag] you have devised you’re going to need to back test your trading system thoroughly and objectively in order to remove any possible doubt about it’s capability.

To remove any self-doubt you need to thoroughly back test or simulate your trading system in such away that it matches the conditions under which it will be traded. Once you have established that you have a reliable and robust trading system only then will you be confident in trading your system.

When trading what is the question in most traders’ mind?

To answer this question I shall quote the introduction from Chapter 8 Back Testing of Mark Jurik’s book Computerized Trading:

Will my trading strategy be profitable? After having gone through the arduous process of crafting a trading strategy, these are the questions you must ask yourself. The ability to answer these questions are the great promises that back testing holds out for all traders. A successful back testing procedure will greatly reduce the probability that you will begin trading with either an unprofitable strategy or one that does not meet your expectations. By adopting a sound and rigorous back testing approach, you will:

  • Pinpoint which approaches to the market that are likely to be successful and which ones are not.
  • Generate good estimates of future performance for each trading strategy you test.
  • Create a record of your trading strategy’s historical trading performance.
  • Produce data necessary for other components of your trading approach such as your asset allocation strategy.

Important [tag]Trading System Criteria[/tag]

Profitability is not the only criteria by which a trading system should be evaluated. Drawdown and stress should equally be considered as well… for example, before you open a trading account:

  • Are you satisfied that your system is reliably profitable?
  • Will draw downs wipe out your account?
  • Is your system trading in a way you can tolerate?
  • Can you tolerate long periods of no trading or too much trading?
  • Can you tolerate a large string of losses?
Back to Top
chart rider View Drop Down
Regular
Regular
Avatar

Joined: 25 Sep 2004
Location: Australia
Posts: 96
Post Options Post Options   Quote chart rider Quote  Post ReplyReply Direct Link To This Post Posted: 12 Feb 2007 at 6:31pm

edge

Peter left Bullcharts some time ago and you wont get a reply from anybody else in the company.

If you can provide further explanation about the particular stop you are trying to code, perhaps I or another reader can help out.

CR

Back to Top
theedge View Drop Down
Newbie
Newbie
Avatar

Joined: 11 Feb 2007
Location: Australia
Posts: 1
Post Options Post Options   Quote theedge Quote  Post ReplyReply Direct Link To This Post Posted: 11 Feb 2007 at 11:30pm

Hi Peter:

Thanks for the pointer about trailing stops. However, I am having real difficulty with non-returning stops, such as the non-returning mean close trailing stop. A formula is provided in 'Breakthrough Trading', and is included in the version of BullCharts I have purchased recently, however, this is for visual scanning purposes. When I try to convert the code for use on the Exit tab of a TradeSim trading system, I can't seem to make the non-returning part of it work. Any pointers to where I might find working code I can adapt?

Back to Top
Peter View Drop Down
BullCharts Staff
BullCharts Staff
Avatar

Joined: 09 Sep 2004
Location: Australia
Posts: 241
Post Options Post Options   Quote Peter Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jun 2005 at 9:28am
For those who have started investigating the new TradeSim scans, one of the big questions has been "What about Trailing Stops".

The TradeSim application note AN2 by Compuvision describes how TradeSim customers can add a volatility trailing stops based on the ATR when using Metastock. This method can also be applied to BullCharts with some small modifications.

As an aside, you can use the BullScript scans in BullCharts to create TradeSim scans, in the same way that you can in Metastock. All of the TradeSim external functions, including ExtFml("TradeSim.TrailingStop") can be used in the same way in this context. The rest of this discussion relates to using the nicer user-interface based TradeSim BullScan.

As the AN2 notes describe, any trailing stop needs to be included as part of the Exit Trigger. Therefore, in BullScan, you need to include any Trailing Stops on the Exit Tab of the editor (not the stops tab). The reason for this is that TradeSim only calculates any Initial Stop script once on the day of entry, which is unsuitable for trailing stops as their value changes over time.

Adding an ATR trailing stop to a system:
  1. Go to the Exit tab
  2. If there are already any criteria already there that you want to keep then you will need to note them down and convert them to BullScript later.
  3. Click on the BullScript radio button just below Exit Condition
  4. Observe the Trailing Stop example on page 12 of AN2. It can be transfered to BullCharts by removing the ExitTrigger:=. Note that the inputs, and the - (in front of ExtFml) also get removed because the AN2 example is for an indicator, and we're building a scan.
  5. That is, copy this script into the BullScript window on the exit tab:
Period:=10;
ARC:=3;
Volatility:=ARC*ATR(Period);

{ Trailing Stop Exit on the Long side }
ExtFml( "TradeSim.TrailingStop",
TRIGGER, LONG, Volatility, CLOSE, LOW)

If you had any other exit conditions, you can add them to the script now. For example: ... ExtFml( "TradeSim.TrailingStop", TRIGGER, LONG, Volatility, CLOSE, LOW) OR CROSS(MA(C,20,S),MA(C,10,S));

See the AN2 document for a more detailed discussion of how this stop works. In general, an Exit Trigger described in any of the TradeSim manual notes can be pasted into the BullCharts Exit tab in this way - by removing the final ExitTrigger:= and any inputs.


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz