Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
backtest error
Collapse
X
-
Hello tranta,
I am unable to reproduce these results even with Exit on close set to False.
I would like to schedule a call with you to take a look on your end. Please send an email to platformsupport [at] ninjatrader [dot] com. In the email please add a link to this forum thread.Chelsea B.NinjaTrader Customer Service
Comment
-
Hello tranta,
The issue is that you are placing up to 100 orders to the same variable using the same signal names. Because of this, the exit order is only exiting the last order preventing other full trades.
To correct this, I have modified the script to make unique signal names for each entry and exit.
Also, you were using the Position.AvgPrice + ProfitTarget * TickSize. The Position.AvgPrice is the entry point of all orders that make up that position. If there are 30 orders in, this will be an average entry price of all 30 orders.
Then only orders that will be left over and closed on exit will be the orders placed at the top of a peak where the price never got back high enough to close the order.
I have modified the script to only use the entry price of the entry order.Attached FilesChelsea B.NinjaTrader Customer Service
Comment
-
Hi tranta,
If you had intended to use the Position.AvgPrice thats fine. You can change this code back. However, this will mean there will be more orders that do not fill.
Also, you should be checking that Position.AvgPrice + ProfitTarget * TickSize is on the right side of the market price for that type of order to make sure that you exit order isn't rejected.Chelsea B.NinjaTrader Customer Service
Comment
-
hello, something like this? Still doesnt do what it should do(Arankaticks)
(DilutionTicks) works fine in backs but when I added sma from daily, that stop worksLast edited by tranta; 08-21-2014, 02:07 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
646 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
367 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 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
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment