Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How do I confirm the ProfitTarget and StopLoss?
Collapse
X
-
Hello morrnel,
The first thing I would recommend would be to turn on the Order Trace function:
Strategy Builder > Default Properties > More Properties > Trace Orders, or:
if (State == State.SetDefaults)
{
TraceOrders = true;
}
Once you then recompile the strategy, you can open a new NinjaScript Output window under New > NinjaScript Output. This will print a log of any orders submitted by the strategy during while it's running, along with any ignored orders. You can then look through and see what may be occurring.
Here is a link to our help guide that goes into more detail on tracing orders:
Trace orders alone won't give you the full picture of whether or not a order should have been entered at a particular price, so adding prints to your strategy that will show in the NinjaScript Output window, with information on what the variables you're using for your conditions are on a particular bar, can be helpful.
This forum post goes into great detail on how to use prints to help figure out where issues may stem from — this should get you going in the correct direction. You can even add these using the Strategy Builder.
If you run into issues like we saw here, the above information will allow you to print out all values used in the condition in question that may be evaluating differently. I'd suggest adding prints of the value you're using to set the stop and target prices right before you submit an order. With the printout information you can assess if a value may not be what you think it should be at that point.
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 foxtrott21, Today, 08:27 AM
|
0 responses
1 view
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
1 view
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
||
Started by linkcou, Today, 07:01 AM
|
2 responses
19 views
0 likes
|
Last Post
by bltdavid
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:25 AM
|
0 responses
2 views
0 likes
|
Last Post
by jaypelle3
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:22 AM
|
0 responses
2 views
0 likes
|
Last Post
by jaypelle3
Today, 08:22 AM
|
Comment