Thanks!!
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
Closed Orders
Collapse
X
-
Hello GibbsB613,
Thanks for writing in to our Support team.
This is most likely occurring due to certain exit conditions you have defined in your strategy and the logic you have defined for setting your profit target and stop loss values. Could you provide me a sample of your code pertaining to the order entry logic so that I can investigate this further?
Also, can you clarify if the orders were cancelled after you disabled your strategy or only when you re-enabled it?
I look forward to your reply.Alan S.NinjaTrader Customer Service
-
else if (State == State.Configure)
{
AddDataSeries(Data.BarsPeriodType.Minute, 240);
SetProfitTarget("", CalculationMode.Pips, 250);
SetStopLoss("", CalculationMode.Pips, 50, false);
}
This is how they are set. The exit logic is moot since it never gets to execute. But just as an FYI, I dont have any exit logic, I adjust my stop and limit and allow them to be hit. The entry is just MA crossovers.
Thanks!!!
Comment
-
Hello GibbsB613,
Thanks for your reply.
Please send me your log and trace files so that I can investigate this further.
You can do this by going to the Control Center-> Help-> Mail to Platform Support.
Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.
Please reference this forum thread by including this link in the body of the email and make the subject ATTN Alan S:
http://www.ninjatrader.com/support/f...ad.php?t=99083
I look forward to your reply.Alan S.NinjaTrader Customer Service
Comment
-
Hello GibbsB613,
Thank you for sending me those files and for your patience.
This behavior is occurring because you are using StartBehavior.WaitUntilFlat. With this StartBehavior, the strategy will check for any active orders previously generated by the strategy on your account and cancel those first. You can find documentation on StartBehavior.WaitUntilFlat here:
http://ninjatrader.com/support/helpG...#WaitUntilFlat
I would recommend using using StartBehavior.ImmediatelySubmit - using this will check for previously generated orders and attempt to match the active strategy order when the order action, order type, quantity, limit price, and stop price are exactly identical. You can find detailed documentation on StartBehavior.ImmediatelySubmit here:
http://ninjatrader.com/support/helpG...ediatelySubmit
Please let me know if I may be of any further assistance.Alan S.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by chbruno, Today, 04:10 PM
|
0 responses
1 view
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
6 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM | ||
Started by frslvr, 04-11-2024, 07:26 AM
|
9 responses
127 views
1 like
|
Last Post
by caryc123
Today, 03:12 PM
|
Comment