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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 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
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X