Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ninjascript to add buttons to chart trader

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

    ninjascript to add buttons to chart trader

    Click image for larger version

Name:	Screenshot 2023-01-02 104707.png
Views:	255
Size:	463.0 KB
ID:	1229578 I have a code to add buttons to my chart trader that will call up and execute my strategies I made in strategy builder. I have one line of code that prevents it from compiling, but I cannot figure out what the problem is. It is line 43, and chatgbt said to add a line calling up "using NinjaTrader.Strategy" just after the "namespace" line but that created more issues. You can see the error for line 43 above and I don't know what it means or how to fix the issue. Any help?





    #2
    Hello larrygf,

    Thank you for your post.

    This appears to be an example script that was copied from. I recommend reaching out directly to the developer for additional assistance. Although our support team does not offer hands-on debugging or scripting assistance, I would be glad to offer a few suggestions. It looks like lines 82-86 in your screenshot are not supposed to be included as part of your script and are notes about how to use it. For example, line 84 mentions replacing "My Strategy" with the name of your strategy. This is in line 52 but I see you have added your strategy name at the end of the line of code rather than replacing "My Strategy" as mentioned in those notes at the end. You could try commenting out line 43 to see if that line is necessary; based on the error, it may just be that you have opening/closing brackets in the wrong places. I suspect that you may need to include lines 42-81 at the class level, but the class is closed by the curly brace in line 40. Ultimately, I still recommend reaching out to the developer directly.

    If you are interested in more information about developing add-ons in NinjaScript, I recommend reviewing the following resources:
    Please let us know if we may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    110 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    59 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    37 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    41 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    78 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X