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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    47 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    22 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    15 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    21 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    23 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X