how to get data from backtest last day before ExitOnClose ? - futures io
futures io futures trading



how to get data from backtest last day before ExitOnClose ?


Discussion in NinjaTrader

Updated by shodson
    1. trending_up 1,839 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 13 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,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 get data from backtest last day before ExitOnClose ?

(login for full post details)
  #1 (permalink)
tel aviv
 
 
Posts: 7 since Aug 2015
Thanks: 0 given, 1 received

When i use backtest i export all actions to a .csv file. my problem is with the last day of backtest which i don't get any prints on that day
Example, i'm running a backtest from 1/1/13 until 10/8/15 and printing every enter to OnBarUpdate including every buy or sell order according to my strategy.
on the last trading day (7/8/15 on this case) i don't see any OnBarUpdate prints. just ExitOnClose price which dosent fit the real close price of that date.
I tried to prints from the function OnTermination but still, when printing the date i get 6/8/15.
does anyone have any idea how to get data from the last day on backtest (like close price)
thank you

Reply With Quote

Can you help answer these questions
from other members on futures io?
QDEL
Stocks and ETFs
Do You Have A PlayBooks/What Form Does It Take?
Traders Hideout
TradeStation Execution
TradeStation
FX Futures have been nagging me for a while
Currencies
3x Fangdango
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Lost & losing hope
25 thanks
Finally Turning the Corner, tha "its 80% Psychology" thing...
22 thanks
Emini 4 Tick Scalp still valid?
18 thanks
Coronavirus COVID-19
13 thanks
Is back testing a waste of time?
13 thanks
 
(login for full post details)
  #2 (permalink)
Germany
 
Experience: Intermediate
Platform: Other
Trading: ES, YM, 6E
 
Posts: 2,668 since Feb 2013
Thanks: 5,097 given, 6,549 received

A frequent error source is a wrong session template.
Did you already make sure that your session template is correct?

Reply With Quote
 
(login for full post details)
  #3 (permalink)
tel aviv
 
 
Posts: 7 since Aug 2015
Thanks: 0 given, 1 received


Sorry i don't think that i understand your meaning
which session template did you mean?
(if you meant, using the right strategy then yes, i did check that the right one is running)

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Germany
 
Experience: Intermediate
Platform: Other
Trading: ES, YM, 6E
 
Posts: 2,668 since Feb 2013
Thanks: 5,097 given, 6,549 received


seanMen View Post
Sorry i don't think that i understand your meaning
which session template did you mean?
(if you meant, using the right strategy then yes, i did check that the right one is running)

NT instruments use session templates.
Data-Series-Window

If you don't use the original instrument setting (e.g. because of yourself trading from a different time zone), you will have to adjust the settings:
Creating-A-Session-Template

Reply With Quote
 
(login for full post details)
  #5 (permalink)
tel aviv
 
 
Posts: 7 since Aug 2015
Thanks: 0 given, 1 received

I'll give it a try
Thank you for your resopond

Reply With Quote
The following user says Thank You to seanMen for this post:
 
(login for full post details)
  #6 (permalink)
tel aviv
 
 
Posts: 7 since Aug 2015
Thanks: 0 given, 1 received

Hi again
I tried to change the session , build a new template and saved but the ninja doesn't let me work with that template for some reason, anyway i'm downloading data from the data manager before backtesting so i don't think that this is the problem.
can you think of any other way that i'll be able to print the close price of the last backtesting day? (meaning, the day of ExitOn Close)

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Germany
 
Experience: Intermediate
Platform: Other
Trading: ES, YM, 6E
 
Posts: 2,668 since Feb 2013
Thanks: 5,097 given, 6,549 received


seanMen View Post
Hi again
I tried to change the session , build a new template and saved but the ninja doesn't let me work with that template for some reason, anyway i'm downloading data from the data manager before backtesting so i don't think that this is the problem.
can you think of any other way that i'll be able to print the close price of the last backtesting day? (meaning, the day of ExitOn Close)

Strange.
Data manager aside, which real-time data do you use or do you only have free EOD data?

Reply With Quote
 
(login for full post details)
  #8 (permalink)
tel aviv
 
 
Posts: 7 since Aug 2015
Thanks: 0 given, 1 received

Im downloading free EOD data from yahoo finance via the Historical data manager

Reply With Quote
 
(login for full post details)
  #9 (permalink)
Germany
 
Experience: Intermediate
Platform: Other
Trading: ES, YM, 6E
 
Posts: 2,668 since Feb 2013
Thanks: 5,097 given, 6,549 received

Ok. Assumed that your strategy code works correctly, your problem presumably results from your data.
That can also cause the session template errors.

Are you just playing a little with the NT functions to learn about the program or do you already plan to develop anything "real"?

Reply With Quote
 
(login for full post details)
  #10 (permalink)
tel aviv
 
 
Posts: 7 since Aug 2015
Thanks: 0 given, 1 received


i ran real before but found too many bugs (for my strategy) within the NT therefore i started writing an external code to implement my strategy but still need to use the NT backtest
can you print the last day close price (same day as exitonclose) when running backtest from your NT ?

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > how to get data from backtest last day before ExitOnClose ?


August 13, 2015


Upcoming Webinars and Events
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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