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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    47 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    33 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X