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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    60 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    148 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    98 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    286 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X