Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple (Non-UI) Add-On

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

    Simple (Non-UI) Add-On

    in NinjaScript Editor, if I right click AddOns and select New Add On

    can I add a simple method to get account details and then call that method from a strategy?

    if so, how?

    #2
    Hello fingers,

    Thanks for your post.

    Yes, you could static methods in an AddOn and then reference those custom methods in another script such as an indicator or strategy.

    See the example script on this forum thread demonstrating how to use a static method: https://ninjatrader.com/support/forum/forum/ninjatrader-8/add-on-development/1051472-mysharedmethods-pass-highs-lows-instrument#post1051574

    See this help guide page for information about accessing the Account class to get account items:



    I would also suggest researching C# Methods and Static in C# from external resources as that will help further explain how this is working along with the structure needed to form methods in C#.
    Last edited by NinjaTrader_BrandonH; 12-20-2023, 10:34 AM.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      https://ninjatrader.com/support/help...ass.htm​​ ... "page not found"

      Comment


        #4
        Hello fingers,

        Thanks for your notes.

        I have update the link in the previous post and you could also find the link below.

        Account class: https://ninjatrader.com/support/help...ount_class.htm
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        43 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        30 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        49 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Working...
        X