Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trying to create a shift+mouse click order entry but keep having errors

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

    Trying to create a shift+mouse click order entry but keep having errors


    I am trying to create an Add-On that would allow me to place order with shift+mouse click. The code is too long so for some reasons i can't do wrap. But this is the link i created on Pastebin.
    Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


    The error messages are follows. How to resolve the errors? Please help.
    NinjaScript File Error Code Line Column
    Mouseclickorder.cs The type or namespace name 'AddOnBase' does not exist in the namespace 'NinjaTrader.NinjaScript.AddOns' (are you missing an assembly reference?) CS0234 26 67
    Mouseclickorder.cs The type or namespace name 'Attributes' does not exist in the namespace 'NinjaTrader.NinjaScript.AddOns' (are you missing an assembly reference?) CS0234 19 38
    Mouseclickorder.cs The type or namespace name 'NinjaScriptAddon' could not be found (are you missing a using directive or an assembly reference?) CS0246 25 6
    Mouseclickorder.cs The type or namespace name 'NinjaScriptAddonAttribute' could not be found (are you missing a using directive or an assembly reference?) CS0246 25 6



    #2
    Hello Realiori9999,

    It looks like you have invalid code in this file. The namespace used for the inheritance is not correct, NinjaScriptAddon and NinjaScriptAddonAttribute are note types that exists in NinjaScript. Additionally based on the errors you are also missing some using statements.

    I would suggest to exclude this script from compilation so you can get back to a compiled state, then right click the addon folder -> new addon and generate it. That will show the current addon class structure and using statements so it compiles.

    After that you can re create your code in the new addon file so its valid.

    Comment


      #3
      thank you. Now I have learnt that ChatGPT is incompetent in programming ninjascript.

      Comment


        #4
        Hello Realiori9999,

        Yes at this time that is not a smart enough tool to understand the context of NinjaScript. For getting started with interacting with a window from an addon I would suggest looking at the following link. Addons have window created events that need to be used if you plan to add to a window when its opened the AddMenuItemFromAddon.zip


        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        578 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 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
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X