Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exits Not working but only occassionally.??

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

    Exits Not working but only occassionally.??

    I've tried all types of exit codes however I'll still get this in my Strategy Analyzer...


    Click image for larger version

Name:	Wallpaper.jpg
Views:	252
Size:	159.4 KB
ID:	1098439
    but other times it works perfectly

    Here's the code...Any thoughts VERY much appreciated.

    Click image for larger version

Name:	Wallpaper 2.JPG
Views:	113
Size:	153.7 KB
ID:	1098440

    #2
    Hello elcowen,

    Thank you for your post.

    The first thing I would suggest would be to turn on the Trace Orders 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 may not give you the full picture of whether or not a order 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.



    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 two.

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    71 views
    0 likes
    Last Post PaulMohn  
    Working...
    X