• 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

programmatically read the type of unit

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

    programmatically read the type of unit

    Hello everybody,

    does anybody know how to programmatically read the type of unit (currency, percent or points) in strategy analyzer? Screenshot attached.

    I have located these classes:

    Code:
    namespace NinjaTrader.Strategy
    {
        public enum PerformanceUnit
        {
            Currency = 0,
            Percent = 1,
            Points = 2,
        }
    }
    
    namespace NinjaTrader.MarketAnalyzer
    {
        public class NetChange : NinjaTrader.MarketAnalyzer.Column
        {
            private Strategy.PerformanceUnit	unit	 = Strategy.PerformanceUnit.Percent;
        }
    }
    I cannot find where the object with "PerformanceUnit" is instantiated. I think it's simply unreachable but who knows whether some of you has the key.

    Thank you.
    Attached Files

    #2
    pintope, sorry for our late reply - what are you looking to create where this would be needed to accessed?

    I'm unfortunately not really aware of a way for accessing the setting chosen. Our next major update will be more flexible in setting a default value here.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hello Bertrand,

      I have managed to transmit via WCF all statistics of the optimization space from NinjaTrader to an application I am developing. The point is most statistics are stored as currency, percent and points. For example:

      Code:
      strategy.Performance.AllTrades.TradesPerformance.Currency.AvgEtd
      strategy.Performance.AllTrades.TradesPerformance.Percent.AvgEtd
      strategy.Performance.AllTrades.TradesPerformance.Points.AvgEtd

      If I’d know the selected type of unit, I’d save some bandwidth and memory.

      I could transmit stats in points and later calculate in currency and percentage, but this approach has also disadvantages. I want all stats be calculated in one place, NinjaTrader.

      Thank you.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Krossaren96, Today, 02:36 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_JoshG  
      Started by Rafmed, 01-28-2019, 11:01 PM
      8 responses
      82 views
      0 likes
      Last Post aligator  
      Started by priceisking, Today, 01:15 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by 2sureshk, Today, 07:29 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by frayrengytrader, Today, 10:58 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_SergeyS  
      Working...
      X