Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Tams

Backtesting Question

Recommended Posts

I have a question on backtesting. The strategy I currently want to test exits upon hitting a profit target. In addition, as is often the case, there is a stop loss exit.

 

My question is how do you go about doing a backtest of something like that? The problem I have is that if I use daily bars, I could easily have a situation where both the PT and the SL are hit, within the same bar. How do I figure out which one gets hit first?

 

The only solution I can think of is to use shorter bars, like hourly.

 

I assume that is the standard way to proceed, or is there some obvious alternative that I'm missing here?

 

 

Someone sent me the above question, I thought I should post the answer here for the benefit of all.

 

 

MultiCharts has a feature called "Bar-Magnifier".

TradeStation calls it Look-Inside-Bar-Backtesting (LIBB).

 

MultiCharts/TradeStation lets you add a second data stream for backtesting.

For example if your strategy is to work on a daily chart. You can add a finer resolution 2nd data stream (eg 5min) to the backtesting, thus allowing the program to calculate your strategy rules and fill orders at intrabar prices, as if in real life trading.

 

 

attachment.php?attachmentid=13640&stc=1&d=1253678976

Backtesting_Precision.gif.480fd77ab2dccd99150c1d07e7539c67.gif

Edited by Tams

Share this post


Link to post
Share on other sites

Some programs would use an algorithm to mimic intra-bar price fluctuation, you can get intra-bar order fill, but the price is simulated.

(ie. somewhere in between the high of the bar and the low of the bar.)

Share this post


Link to post
Share on other sites

To be honest, I'm not 100% sure of the intricacies of Ninja backtesting (because I don't use it anymore), but from what I remember, it will give you a fill at the close of each bar, regardless of the timeframe, and there were no settings to adjust this. I could very well be wrong about that, but I'm quite sure that there is some aspect of Ninja's backtesting that made it useless for me, or at least very cumbersome to use.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.