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!
See more
See less

Partner 728x90

Collapse

NT7 Strategy stops without any reason

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NT7 Strategy stops without any reason

    I have a Strategy that usually does more than one order each day.
    Sometime after 1 or 2 orders the chart continues showing new bars regularly.
    Looking indicators I realize that a new position should be opened and there are no Log messages about any error.
    I press F5 to update the Strategy in the chart and the position, which I knew it should have been opened, is shown in the past. Along with those that have been opened regularly.
    This happens quite randomly.
    What could be the cause?

    #2
    Hello mbogliardi,

    Thank you for your note.

    Do you receive any errors, either on screen or in the Log tab of the Control Center regarding the strategy when this occurs? If so, what is the text of the error(s)?

    The first thing I would recommend would be to turn on the Order Trace function. To enable TraceOrders, add this line into the Initialize() method of your NinjaScript strategy:

    TraceOrders = true;

    Once you then recompile the strategy, you can open a new NinjaScript Output window under Tools > Output Window. 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:

    https://ninjatrader.com/support/helpGuides/nt7/traceorders2.htm

    Trace orders alone may not give you the full picture of whether or not a trade should have been entered on a given bar, 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.

    https://ninjatrader.com/support/foru...ns-not-working

    If you run into issues like you're seeing here, the above information will allow you to print out all values used in the condition in question that may be evaluating differently. With the printout information you can assess what is different between the strategy running on live data versus when it calculates on historical data.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DanielSanMartin, Yesterday, 02:37 PM
    2 responses
    12 views
    0 likes
    Last Post DanielSanMartin  
    Started by DJ888, 04-16-2024, 06:09 PM
    4 responses
    12 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by terofs, Today, 04:18 PM
    0 responses
    11 views
    0 likes
    Last Post terofs
    by terofs
     
    Started by nandhumca, Today, 03:41 PM
    0 responses
    7 views
    0 likes
    Last Post nandhumca  
    Started by The_Sec, Today, 03:37 PM
    0 responses
    3 views
    0 likes
    Last Post The_Sec
    by The_Sec
     
    Working...
    X