What would be the best way to restrict the Strategy Analyzer to close position within the entry bar? This is for Strategy wizard NT7 using Profit Target (ticks) as the exit condition
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Same bar Exit
Collapse
X
-
Same bar Exit
During a backtest due to the lack of granularity inside the current bar it's impossible to tell whether a trade would reflect a real life situation.
What would be the best way to restrict the Strategy Analyzer to close position within the entry bar? This is for Strategy wizard NT7 using Profit Target (ticks) as the exit conditionLast edited by sashe71; 01-09-2020, 07:06 PM.Tags: None
-
Hello sashe71,
Thank you for your note.
There would be no way within the Strategy Wizard to add intrabar granularity for use in backtesting - you would need to unlock the code to add the necessary secondary data series. We've got an example in our help guide on how to set this up:
You can import this through File > Utilities > Import NinjaScript. Once imported, you can open it under Tools > Edit NinjaScript > Strategy. You can then review the code, test it, and modify or use parts of the code to fit your needs.
Alternatively, you can download Market Replay data for many instruments that you can use to playback your strategy as if it was running in real time using the Market Replay Connection - as Market Replay data does have intrabar granularity, you are able to run a Strategy on each tick instead of on bar close.
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Waxavi, Today, 02:00 AM
|
1 response
7 views
0 likes
|
Last Post Today, 02:53 PM | ||
Started by alifarahani, Today, 09:40 AM
|
5 responses
23 views
0 likes
|
Last Post Today, 02:53 PM | ||
Started by Kaledus, Today, 01:29 PM
|
5 responses
12 views
0 likes
|
Last Post Today, 02:56 PM | ||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 02:41 PM | ||
Started by PhillT, Today, 02:16 PM
|
2 responses
7 views
0 likes
|
Last Post
by PhillT
Today, 02:33 PM
|
Comment