Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
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 for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
how to get data from backtest last day before ExitOnClose ?
Knowing many of the pitfalls, I for one switched to self-coded tests about 2 years ago.
Same with many of the more active traders here (some also use R, MATLAB or other additional libraries).
Just pushing my button to find out if I have the latest close in backtests (answer: yes, I do) won't help you.
Exit on close has some known issues since data sources / vendors treat settlements and last traded prices differently, which can cause misleading backtesting results.
So my advice would be: Use a regular real-time data vendor, configure correct session settings etc., then do your development and backtests.
Considering the development and backtesting methodology, I'd recommend @kevinkdog 's series of webinars. They will save you a ton of time (and/or money).
Hi again
Thank you for your advice , i will give it a try
I manage to solve that problem by setting CalculateOnBarClose to be false.
That way i'm able to get all last backtesting day data
That error cause is nearly as basic as the session template
A caveat: Your decision comes with a price: Toggling CalculateOnBarClose to false with real-time data will result in interpreting all last prices as a "current close".
So be aware that in real trading on real-time data you will have every last tick as a (but not "the") close. Without correcting this effect with suitable time checks etc.
in your program, your testing results will not be valid for real-time use.
---
Wise decision to give methodology a try. Many beginners just get absorbed by program, backtesting, and (even more fallacious: ) optimization functions.
Then after a while they believe to have a strategy that's almost the egg of Columbus, but in fact it's only the result of overfitting past data.
Like in trading starting with methodology is important because you avoid some bad habits from the start.