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
BackTest Error with Take Profit/Stop
Collapse
X
-
BackTest Error with Take Profit/Stop
I am backtesting a rather simple short only strategy. The backtest produces a 100% loss rate and when I investigated on the chart tab in the strategy analyzed I noticed that all my trades would close via the Profit target, albeit 1 tick above my entry. I can see just looking at the chart that these trades should be winners and am unsure as to why this error is occurring. Here is what my "Stops and Targets" page looks like in the strategy builder and here is an example on the chart of what I am talking about.Tags: None
-
Hi Chelsea. Thank you for your reply.
I am using Historical data.
I know these trades are winners based on the parameters of my SL and TP. When I open the Trades tab (and I have experimented with different SL settings and TP settings), every single trade is closed at either a 1 tick loss or at breakeven and always via "Profit Target". You will also see each trade is exited immediately. I will attach an image. All things considered, if each trade was getting stopped out for a loss, wouldn't the trade be exited via the stop loss and not the take profit?
Comment
-
Hello toeby89,
These appear to be historical overfills.
Try setting the Order Fill Resolution to High.
Does the provide more expected outcome?
It appears you are using an out-of-date release.
Currently NinjaTrader has released 8.1.2.1.
Updates to NinjaTrader will contain the latest security updates and bug fixes, as well as occasional new features and instruments.
To update NinjaTrader- Shutdown all programs including NinjaTrader *important
- Download NinjaTrader from the link below
Click here to download NinjaTrader - Double click the downloaded file to execute it
- Follow the on screen instructions
- Restart NinjaTrader
https://ninjatrader.com/support/help...ease_notes.htmChelsea B.NinjaTrader Customer Service
Comment
-
Hello toeby89,
May I test the strategy on my end?
To export a NinjaTrader 8 NinjaScript so this can be shared and imported by the recipient do the following:- Click Tools -> Export -> NinjaScript Add-on...
- Click the 'add' link -> check the box(es) for the script(s) and reference(s) you want to include
- Click the 'Export' button
- Enter a unique name for the file in the value for 'File name:'
- Choose a save location -> click Save
- Click OK to clear the export location message
- (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>
http://ninjatrader.com/support/helpG...nt8/export.htm
Once exported, please attach the file as an attachment to your reply.Chelsea B.NinjaTrader Customer Service
Comment
-
Hello Chelsea,
As much as I would like to upload my script for you to test, I do not think that will be possible as I am using a 3rd party add-on to determine some of the values for my conditions. I assume these are not the problem, as I use them in other strategies without issue. I would also prefer not to upload my strategy publicly.
Thank you once again for your time and help with this mater.
Comment
-
Hello toeby89,
I made a test script and I am not able to reproduce.
StopTargetPnlTest_NT8.zip
Does this test script reproduce on your end?
May I confirm you are seeing version 8.1.2.1 in the Help -> About window?Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Vietanhnguyen2hotmailcom, Yesterday, 10:29 AM
|
4 responses
23 views
0 likes
|
Last Post Today, 09:06 PM | ||
Started by PhillT, 04-19-2024, 02:16 PM
|
4 responses
35 views
0 likes
|
Last Post
by PhillT
Today, 04:24 PM
|
||
Started by ageeholdings, 05-01-2024, 05:22 AM
|
5 responses
37 views
0 likes
|
Last Post
by ageeholdings
Today, 03:21 PM
|
||
Started by reynoldsn, Today, 02:34 PM
|
0 responses
13 views
0 likes
|
Last Post
by reynoldsn
Today, 02:34 PM
|
||
Started by nightstalker, Today, 02:05 PM
|
0 responses
21 views
0 likes
|
Last Post
by nightstalker
Today, 02:05 PM
|
Comment