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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
81 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
64 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
68 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
55 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment