Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Marked up chart incorrect
Collapse
X
-
Marked up chart incorrect
My strategy allows for two trades being entered in the event that the profit target for the first trade is not achieved. In the chart illustration which I will attach, Trade1 is 4,000 and Trade2 is 12,000.and the performance of the strategy seems to be correct in that when the profit target for Trade2 is achieved the profit of the 12,000 trade is offset against the profit of the 4000 trade and the combined quantity of 16,000 profit target is offset and the second 16,000 profit target is cancelled. I am trying to understand why there are two 16,000 profit targets as if there are two 16,000 trades and is there a way to get the chart marked up correctly?Tags: None
-
Hello galsermil,
The chart is showing the orders and executions. So for this to be marked "correctly" the correct orders would need to be submitted in the code.
If you are scaling in and out using the managed approach each scaled quantity should be a unique entry order with a unique signalName, with unique exits attached to those fromEntrySignals.
Below is a link to an example.
How do I set up Strategy builder to scale out of a 3 contract order? Say close 1 @ 5 ticks, close 1 @ 15 ticks and trail 1 at 25 ticks? Do you have a video
To confirm, the issue is there are two limit orders submitted, however you are only expecting one limit order, is this correct?
Are these orders submitted with SetProfitTarget() or are these submitted with an order method?
Enable TraceOrders, and print all values used in the conditions that submit these orders to understand the behavior.
Save the output to a text file and include this with your next post.Chelsea B.NinjaTrader Customer Service
-
Chelsea,
When my strategy is flat, I am looking for a short or long signal. On receipt of a signal a trade is entered in that direction with a <SetProfitTarget> with a Trade1Size. If the trade goes against me in an amount of Trade2Deficit, I take a second trade 3X size of Trade1Size with a second <SetProfitTarget> with the quantity fixed at Trade1Size + Trade2Size. At this point, the system takes over and throughs out two profit targets with a quantity of Trade1Size +Trade2Size, in both instances. One will be at the correct location of the profit target and one in an undetermined location. The correct profit target is the closest to the current price so when. and if. it is achieved, the trade is exited and the second profit target is cancelled.
Comment
-
Hello galsermil,
Use Print() and TraceOrders to understand behavior.
Enable TraceOrders.
Print the time of the bar and all values that are used in the conditions that place orders. Add labels for each value and comparison operator to show how the values are being compared.
Print the order object in OnOrderUpdate.
Below is a link to a forum post that demonstrates using Print() and TraceOrders to understand behavior.
Save the output to a text file and include this with your next post.
If you are using Set methods, be sure the set method is called before calling an entry order.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
59 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
134 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
74 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|
Comment