Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Issue Need Guidance

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

    Strategy Issue Need Guidance

    Hello,
    I'm very new to programming and Ninjascript. I have been trading for quite some time but I was just throwing some ideas around trying to get this to work. My script placed a trade as you can see from the photo but it did not exit at the proper location.
    I will upload script and photo for an example. If you have any further questions please ask because I really am trying to get this to work and of course learn to better benefit.


    PNG file is where I wanted strategy to exit.
    PDF whole script.
    Attached Files

    #2
    Hello,

    Thank you for the post.

    Because you are using a custom indicator, I could not try the code to understand what may be occurring. Instead you could add Prints to see what had happened at that time.

    In general in the case of a condition not becoming true when you think it should, Prints are a good starting point to find out more information on why that happened.

    You could add a print before each of the conditions to evaluate if the condition to take profit is being reached at all, and if so why it did not become true. We have a guide that explains some debugging steps here: http://ninjatrader.com/support/forum...ead.php?t=3418

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X