Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy not following conditions

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

    Strategy not following conditions

    Hello! I have made a strategy and applied it on a the ES! in 5 mins timeframe. Im considering conditions from another timeframe (EMA(89) (60 minutes) < SMA(200) (60 minutes)). However the strategy it is not taking into account that particular condition.
    Attached the screen shot of configuration.
    Could you please provide some guidance on why could this be happening? Thanks!
    Attached Files

    #2
    Hello imoncada1,

    Thank you for your post.

    I apologize for the delay in my reply as we've been switching to a new support system this week and are a bit behind.

    I'm not seeing anything blazingly obvious as to why you may not be seeing orders when you would expect, but 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:

    https://ninjatrader.com/support/help...aceorders2.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. You can even add these using the Strategy Builder.

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

    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. With the printout information you can assess what is different between the two. I'd suggest printing the values you're using in your conditions so you can easily see what they correspond to on the chart and better understand if an order should be placed or not based on the values returned.

    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    71 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    42 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    25 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    28 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    56 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X