• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Window Tracking Performance Data

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

    Window Tracking Performance Data

    Hello,

    My goal is to have a NTWindow w/ selector of an Account. In the Add On after the Account is selected would first Display Account Data, BuyingPower / Performance / etc.
    Then By Instrumment.Strategy (Variables Generated in the Strategy) current In-Out Amount / Current Quantity Held / etc. On Close of NT8 save off data for next startup.

    What key considerations must I consider?

    Best regards,
    GTBrooks

    #2
    Hello GTBrooks,

    Thank you for the post.

    In this case, you could find a good portion of the items you have mentioned in the addon sample we have at the following link:

    https://ninjatrader.com/support/help...t_overview.htm

    Specifically, the file listed as "Download AddOn Framework NinjaScript Basic file to your desktop"

    In this sample, it shows the required syntax to create an Instrument selector, Account selector, subscribes to data and account metrics, place orders and other actions including persistence. This is a complete addon sample, in combination with the help guide addon section this describes the majority of what is possible.

    After reviewing the sample, if you have further questions related to any of the items please let me know.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      That is the majority of it, but ...

      NinjaTrader_Jesse,

      Thank you, there is a lot of very useful NinjaScript that I can re-purpose.

      There is still one issue that I think I will run into.
      AddOn 1 = Collects and holds in Var form All Strategies Trading on Sim101 account (Strategies trading on Sim will make Var available for Addon To store (Trade Performance by Instrument-Strategy))
      AddOn 2 = Collects and holds in Var form All Strategies Trading on Real Time account (Strategies trading on Sim will make Var available for Addon To store (Trade Performance by Instrument-Strategy))
      AddOn 3 = Rosetta Stone (a) Instrument-Strategy (Sim) (If Instrument-Strategy (Trading > Par) on all 5 built-in Performance metrics = True) (b) Instrument-Strategy (Real-Time) see's Sim is profitable enough to allowed to trading.
      note: All performance Metrics in Real-Time not Historical.

      .or. is there a way to do this in 1 AddOn?
      Last edited by GTBrooks; 09-27-2017, 02:54 PM.

      Comment


        #4
        Hello,

        Thank you for the reply.

        I am not certain I could answer the question from these details. You specified that these concepts should be in 3 addons, the answer to this question, if they can be merged, this would depend on the logic you used.

        You would need to determine this from your end, there is nothing I could really mention that will specifically prevent you from using only 1 addon. It really depends if your logic can all be placed in one addon.

        As you are using C# for the programming language, you are free to separate the addon as needed I.E. making custom classes or structure it however you want that works with what you are trying to do.

        I generally suggest to start simple, or start with the sample and build off of it. Try your idea in the sample and see if you run into any roadblocks. Addons are a very large subject which I'm sure there are many ways to accomplish different tasks. So long as you are using the methods in the addon guide to interface with the platform, you can for the most part structure your script however you want.

        The sample gives a general idea on how to do most basic items like appending a menu item, creating a window etc. Outside of that, your logic can be formed how you want, the examples are more or less just a guide on how to interact with NinjaTrader.

        If you are planning to use multiple addons, you would likely need to make a way for them to communicate. You could review using a Static class if you want to do that: https://ninjatrader.com/support/foru...24&postcount=3

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          I currently have been able to generate Variables With my Strategies;
          [AccountInstrumentStrategy] = True.
          To look the Variables up on the AddOn side I will need to make an Object that puts together 3 lists (already worked out how to put them together). I have a way to Get Accounts Connected and Strategies traded on the Accounts.
          I need to know the Instruments traded on the Account & how would you generate a list of Instruments on the Account in an AddOn?

          Goal = List 1 (Account) + List 2 (Instrument) + List 3 (Strategy) = Lookup strategy var (True/False)

          Comment


            #6
            Hello,

            Thank you for the reply.

            I am unsure I understand the question here in full but was able to pick out that you asked: "I need to know the Instruments traded on the Account". You can locate orders to the account by using the Account object its self and looking at the various collections the account has.

            You can see the various collections available here: https://ninjatrader.com/support/help...ount_class.htm

            You could use the Orders or Executions collections to know what has been traded on an account and then check the Instrument of that order/execution to know where it should be paired. You can also view active positions using the Position object.


            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Thank you for the response.

              It looks like I might be able to use https://ninjatrader.com/support/help...ount_class.htm to get trade collection information broken out by Account & Strategy, but NOT instrument. If I could use the Trade Collection to get performance metrics of strategies trading on a given instrument. I would NOT need a AddOn, it would all be able to be done in the Strategy itself. this would simplify things for me.

              How could I pull Account Trade Collection information & break it into Strategies trading on 1 instrument?
              Then taking that information and rank trade performance broken out by Strategy?
              Finally ranking the Strategy position over all strategies trading on a given instrument?

              Comment


                #8
                Hi GTBrooks, thanks for your follow up.

                The Account object can be used in Addons, Strategies, and Indicators. Just set up the Account object like the example on this page:

                https://ninjatrader.com/support/help...ount_class.htm

                With the account object you can get all Order, Executions, and AccountItems for the selected account.

                Please let me know if I can assist any further.
                Chris L.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by maltese, Today, 02:54 AM
                0 responses
                2 views
                0 likes
                Last Post maltese
                by maltese
                 
                Started by morrnel, Yesterday, 04:18 PM
                1 response
                8 views
                0 likes
                Last Post NinjaTrader_Marco  
                Started by jmahon, Today, 02:45 AM
                0 responses
                4 views
                0 likes
                Last Post jmahon
                by jmahon
                 
                Started by brianshih, Today, 02:40 AM
                0 responses
                2 views
                0 likes
                Last Post brianshih  
                Started by franco12364, Yesterday, 02:29 PM
                1 response
                11 views
                0 likes
                Last Post NinjaTrader_Marco  
                Working...
                X