Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ExitOnClose at EOD data backtest
Collapse
X
-
sniper29a,
The situation I am describing is for backtesting. You have the close price therefore you cannot trade on that bar. If you are so unhappy with the conservative fill algorithm that is required by NinjaTrader in order to prevent the overstating of PnL, you can program your own. We cannot offer you any support in this endeavour besides providing you this link though: http://www.ninjatrader-support.com/H...FillTypes.htmlJosh P.NinjaTrader Customer Service
Comment
-
Josh, this is not "Bogus", as you stated.
Your arguments are based on the way NT is coded, not on the purpose of backtesting. We can argue all day over what the price was 5, 10, 30 seconds before the close or after the open, but that's not the purpose of the backtest. If you are testing an open/close stategy, such as I am attempting, some small amount of slippage is expected. If my strategy depends on the accuracy of that small amount of slippage, then I should probably abandon that strategy.
There should be no practical reason that I can't enter a trade on the open and exit on the close of that day, and I shouldn't need intraday data to do this. As I stated in a previous post, other software allows this, and it should be available in NT. This issue is a matter of how NT is coded, not on the aspects of backtesting.
Comment
-
As well as you have already Open price. I am not unhappy. I have been attempting to help you improve your program to level of professional programs. But, you seem to be offended by this simple issue/function.
This discussion almost raise to international affair.
I am not programer and I don't like wasting of my time by impossible things. I do all manually and just use computer for little help.
Sorry guys for raising this question.
Comment
-
chartman,
No, this is a fundamental limitation of backtesting. There is one actionable point and one deterministic point per bar. The actionable point is at the beginning of the bar and the evaluative point is at the end of the bar. All orders are placed to the next bar as evaluated at the end of the bar because the next actionable point is there. Each bar is a snapshot of the exact moment you have OHLC of the bar. No other points in time are known therefore no actions can be taken any time intrabar.
You have two options available to you. Program your own fill algorithm or stop using daily bars and just use minute bars.
You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this byJosh P.NinjaTrader Customer Service
Comment
-
sniper29a,
Sorry if I came across as offended. It is a sticky issue that is always hard to convey the concepts about and always leads to drawn out debates. Do not get me wrong, I completely understand where you both are coming from, but there are pros and cons to all approaches. The way NinjaTrader does it you need to program your strategy in a fashion that allows for the flexibility you are looking for through multi-time frames because NinjaTrader by default will provide you with results that are the most conservative possible. In our opinion, it is far worse to have an overstated strategy giving you false optimizing than to just have an understated performance report.
Hopefully that puts the issue to rest.Josh P.NinjaTrader Customer Service
Comment
-
Josh, I know you want to end this discussion, so you need not reply. However, you have answered my comment regarding this as a coding issue:
"... There is one actionable point and one deterministic point per bar. The actionable point is at the beginning of the bar and the evaluative point is at the end of the bar. All orders are placed to the next bar as evaluated at the end of the bar because the next actionable point is there. Each bar is a snapshot of the exact moment you have OHLC of the bar. No other points in time are known therefore no actions can be taken any time intrabar."
This means that the NT S/W treats the whole bar as a single point in time, which is OK if that bar is a tick. If the whole bar is a day of trading, then the logic should be different, to allow for the fact that the whole bar (in reality) occurs in the sequence of "(1)Open - (2)High and Low and everything inbetween - (3)Close."
Unlike some others, I have done a lot of coding over the years, in several languages, including machine code. This is a matter of not wanting the logic to perform as we are requesting, not a matter of the inability to code it. While I appreciate having this S/W free to use during my testing, I am using it because I would rather employ my limited time testing than coding.
When I finally decide to go live, I will then be able to justify purchasing tick data, and the whole problem will go away, but only after I re-code my strategy using tick data. This is only an attempt to get NT to do what I expect during backtesting using daily data.
Thanks for your help - it saves me from continuing to find out why ExitOnClose() is not working as I thought it should.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
333 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment