Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Best way to Add new Input in Custom Indicator and suggestion for any Good Book

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

    Best way to Add new Input in Custom Indicator and suggestion for any Good Book

    Hi,

    I am an experienced .Net programmer but new to NinjaScript.

    I created a custom Indicator and this is under continuous development. Initially ninja wizard helped me to create the basic coding with defined inputs. Now i wish to add few more inputs from the user.

    I am aware that i can add further properties for new Inputs, but there is a region in indicator "NinjaScript generated code" which uses some kind of caching and it uses Inputs to identify the instance.

    I wish to know the best way to ADD new inputs in any existing indicator?

    Also suggest me any good book / video where i can learn NinjaScript. I am aware of documentation but that is good for reference not for reading as newbie as those are not made with teaching in mind.

    Thanks in advance,

    Regards,

    #2
    Hello raaxus,

    The best way to add new properties it to open a new indicator wizard and create the new properties using that. You can then generate the code, that allows you to just copy/paste the properties from the temporary generated indicator into your existing indicator. You would close the new indicator after that process not saving it.

    You can do that or just type out the property in the same format as your existing properties. If you want it to be a user input you will want to mark the property with the [NinjaScriptProperty] attribute.



    Once you compile from that indicator it will regenerate the bottom region of the indicator checking for new properties.

    As for books and videos, the only content I can really suggest would be the help guide and the strategy builder video. The educational material that is available is more targeted at teaching specific concepts rather than walking you through creating something start to finish. There are many examples available however they are generally either specific tailored examples or full scripts, exploring is necessary when working in NinjaScript.

    Generally I suggest looking to the system indicators to start learning, for example understanding how the SMA works is a good staring place at understanding how to write an indicator. There is not much to that indicator aside from its OnBarUpdate calculation. This could help to see what the general structure of an indicator is and how it works. That also allows you to see the common items like OnBarUpdate or OnStateChange:




    The help guide contains a wealth of knowledge but because there is so much to cover it generally will be contained in the relevant parent section.




    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    647 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    369 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    572 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X