• 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

What is accessible from an Addon

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

    What is accessible from an Addon

    I have a very complex strategy and I would like to separate some of its functions as addons. What is and is not accessible from an Addon that is called from a strategy. For example how would I get the SystemPerformance.AllTrades.TradesPerformance.Trad esCount from the addon or be able to call SendEmail() , or Draw.Text on the chart that has the strategy attached from the Addon or access the ChartControl so that I delete objects from the chart. Could you please give me some examples.
    Last edited by cutzpr; 08-18-2019, 10:02 PM.

    #2
    Hello cutzpr,

    This would be outside of what is supported by NinjaTrader Support.

    However, are you creating methods that the Strategy instance is passed to as a parameter?

    Is these methods in the Strategy class?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea,

      I don't understand how describing NinjaTrader's NinjaScript's capabilities is outside the scope of what is supported by NinjaTrader Support.

      These methods are in the Strategy class and work perfectly when the are called from within the Strategy. I just want to clean up the code and make the strategy more efficient by only calling and disposing of the methods when necessary and not having to instantiate all of them with every instance of the strategy..

      Can you at least let me know what is and is not accessible from the add-on class.

      Comment


        #4
        Hello cutzpr,

        Specifically using an addon to affect a chart in any way is outside of what is officially supported with an addon.

        This will not be documented and will take custom C# and exploration.

        While using any C# is ok to do for your custom scripts, using an addon to affect a ChartControl is outside of the supported capabilities of NinjaTrader.
        I am happy to submit a feature request on your behalf for this to be officially supported and documented if you would like.

        That said, I'm interested and I'm happy to provide any help I may know about should you decide to create this script on your own or find a developer to code this custom code for you.


        Listing everything in the addon class would be pages of text, that we have already documented in the help guide.
        https://ninjatrader.com/support/help...-us/add_on.htm

        You can access an account. You can request data. You can make a new window. But you officially cannot start messing with open charts.
        If you know what you are doing, you can do it anyway. It just won't be officially supported.
        If it's unsupported, the forum is a good place to ask as the entire community can assist.

        If you pass the instance of the strategy or indicator to a static method that instance will have all of the properties and methods of the inherited class (of Strategy or Indicator).
        Below is a link to an example that uses unsupported code to give you an idea.
        https://ninjatrader.com/support/foru...245#post712245
        Last edited by NinjaTrader_ChelseaB; 08-20-2019, 02:10 PM.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by RandanAL, Today, 09:05 AM
        0 responses
        2 views
        0 likes
        Last Post RandanAL  
        Started by cstern71, 09-02-2019, 10:30 AM
        4 responses
        60 views
        0 likes
        Last Post Lancer
        by Lancer
         
        Started by Hanstanz, Today, 04:44 AM
        0 responses
        10 views
        0 likes
        Last Post Hanstanz  
        Started by juniortut, Today, 04:38 AM
        0 responses
        5 views
        0 likes
        Last Post juniortut  
        Started by rojiinko, Today, 03:58 AM
        0 responses
        5 views
        0 likes
        Last Post rojiinko  
        Working...
        X