How to backtest the strategy on specific trading time in ninjatrader? - futures io
futures io



How to backtest the strategy on specific trading time in ninjatrader?


Discussion in NinjaTrader

Updated
    1. trending_up 3,636 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

How to backtest the strategy on specific trading time in ninjatrader?

(login for full post details)
  #1 (permalink)
 owen 
CT
 
Experience: Beginner
Platform: NinjaTrader, TradeStation
 
Posts: 13 since Aug 2009
Thanks: 0 given, 6 received

Everyday, I only trade 2 hours. I would like to backtest some strategy only in this two hours everyday. Who can tell me how to setup this time period in ninjatrader?

I also would like to backtest some strategy in specific day each week. Like I only want to backtest the strategy on each Monday. How to do that?

Thanks

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
2003 Nymex Symposium
Traders Hideout
Pulling Historical Account
Sierra Chart
Pause calculation When Position is Open-Backtesting
ThinkOrSwim
Running two strategies on one chart; Has anyone done it …
MultiCharts
Mack + Order Flow
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Spoo-nalysis ES e-mini futures S&P 500
58 thanks
Would you share your Holy Grail?
21 thanks
Are you sure that your broker cant spy your trades and w …
19 thanks
Want your NinjaTrader indicator created, free?
15 thanks
Big Mike in Ecuador
14 thanks
 
(login for full post details)
  #3 (permalink)
 aslan 
Market Wizard
Madison, WI
 
Experience: Advanced
Platform: ALT
Trading: ES
 
aslan's Avatar
 
Posts: 622 since Jan 2010
Thanks: 351 given, 1,117 received


You can put some code at the beginning of your strategy to do something like this:

 
Code
int time = ToTime(Time[0]);
if (time >= 83000 && time <= 103000) {
    // do your thing
}
Make sure you close an open position at the end of your timeframe as well.

Another interesting item in NT, is the "distribution" graph in the performance report, as it shows a distribution of the trades by hour of day. This can be very enlightening.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > How to backtest the strategy on specific trading time in ninjatrader?


Last Updated on March 21, 2010


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts