• 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 Bionian, Today, 02:46 PM
      2 responses
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by rwilliam, Today, 01:54 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by franco12364, Today, 11:27 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by YevhenShynkarenko, Today, 11:48 AM
      4 responses
      25 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by NinjaTrader_ChrisL, Today, 11:21 AM
      0 responses
      21 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Working...
      X