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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        56 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        75 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        39 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        101 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        60 views
        0 likes
        Last Post PaulMohn  
        Working...
        X