Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Portfolio architecture

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

    Portfolio architecture


    Hello,

    I wanted to launch a query about different software architectures to create a portfolio in NT8.

    So far I have been focused on creating strategies and creating the money management algorithm in each of them.

    Now I'm exploring the best way to automate a portfolio consisting of these strategies.


    Could I create a strategy that would take care of the money management of the entire portfolio and automatically launch the individual strategies with the assigned amounts (without having to open a Chart or go to the strategies tab)?
    Could this be done with another piece of software?
    Does NT8 have solutions to do this or would I have to code it from scratch?


    I am relatively new to NT8 but have experience in C/C++ and before coding I wanted to ask.

    Thanks in advanced.​

    #2
    Hello SobrmNT8,

    Thank you for your post.

    Can you clarify what you mean by an automated portfolio?

    If you are trying to automatically enable/start your strategies without doing so from the chart or strategies tab, unfortunately this is not possible. We intentionally require users to manually and consciously enable their strategies so they are 100% aware they are running. Changing the functionality intended by the developers is not supported.

    To enable many strategies at a time, you can go the strategies tab of the Control Center, use Ctrl + A to select all strategies, then right-click and enable all at the same time.


    You can also submit orders from an AddOn script instead, which could run automatically upon launching NinjaTrader.

    AddOn Development - https://ninjatrader.com/support/help...t_overview.htm
    CreateOrder - https://ninjatrader.com/support/helpGuides/nt8/createorder.htm
    Submit - https://ninjatrader.com/support/help...nt8/submit.htm

    Please let us know if you have any other questions.
    Gaby V.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your response.

      As automated portfolio I was referring to a wrapper containing some strategies where I can implement various portfolio algorithms.
      Like balancing instruments, strategies, capital allocations to each strategy, connect and disconnect strategies,etc.


      Thanks for the links to the AddOn script, at a quick glance I see that I could access the account data and market data from here.
      Could the methods and indicators normally used in the strategies be accessed from the AddOn as well?
      I don't see anything documented about this approach.​


      Thanks and regards!​

      Comment


        #4
        Hello,

        Indicators cannot be called from AddOn, as AddOn does not support series. You will need to custom calculate all values and get the data from a BarsRequest.

        BarsRequest - https://ninjatrader.com/support/help...arsrequest.htm

        If you want to share methods with multiple scripts, you can use a partial class. Please see the sample script linked below demonstrating using a partial class.

        Explanation: I wrote a base class Indicator class that I'm using to inherit all my other indicators from. So this baseclass is defined as: namespace NinjaTrader.NinjaScript.Indicators.AssistedTrades { public class ATBaseIndicator: Indicator { ... } } And any other indicator is defined as: namespace NinjaTrader.NinjaScr


        Please let me know if we can assist further. ​
        Gaby V.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by geddyisodin, 04-25-2024, 05:20 AM
        8 responses
        60 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        4 responses
        3,287 views
        1 like
        Last Post jgualdronc  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        5 views
        0 likes
        Last Post Option Whisperer  
        Started by halgo_boulder, 04-20-2024, 08:44 AM
        2 responses
        22 views
        0 likes
        Last Post halgo_boulder  
        Started by mishhh, 05-25-2010, 08:54 AM
        19 responses
        6,189 views
        0 likes
        Last Post rene69851  
        Working...
        X