Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Sim to Real
Collapse
X
-
Hi occam,
There's not one cause that springs to mind. Strategies should function similarly when applied to sim account or live account. CalculateOnBarClose determines whether conditions are evaluated on tick by tick basis or on bar close.
The bar closing event and the next bar open are the same event so maybe you're seeing an issue with how your execution is plotted? Please review the link below on this:
In order to evaluate strategy behavior on either sim or live account, you need debugging tools like TraceOrders output and print statements.
Ryan M.NinjaTrader Customer Service
-
Originally posted by NinjaTrader_RyanM View PostI'm sorry - I don't follow your last reply. Can you please clarify or provide a code snippet along with what you expect to happen with it?
Thanks
Jerry
Comment
-
Hi Jerry,
In a backtest, orders are submitted on the bar after the condition evaluates to true. This is not configurable.
This sample can help you achieve intrabar granularity in a backtest:
You have to move away from the Set statements, and use for example ExitLongLimit() and ExitStopLimit() for your stop loss and target orders.Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Jltarrau, Today, 05:57 AM
|
0 responses
3 views
0 likes
|
Last Post
by Jltarrau
Today, 05:57 AM
|
||
Started by f.saeidi, Today, 05:56 AM
|
1 response
2 views
0 likes
|
Last Post
by Jltarrau
Today, 06:00 AM
|
||
Started by Stanfillirenfro, Yesterday, 09:19 AM
|
7 responses
51 views
0 likes
|
Last Post Today, 05:31 AM | ||
Started by TraderCro, 04-12-2024, 11:36 AM
|
4 responses
70 views
0 likes
|
Last Post
by Mindset
Today, 05:29 AM
|
||
Started by Mindset, Yesterday, 02:04 AM
|
1 response
15 views
0 likes
|
Last Post
by Mindset
Today, 05:26 AM
|
Comment