Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SystemPerformance

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

    SystemPerformance

    strategy development going well but unsure about final error ...

    Code:
    using NinjaTrader.Cbi;
    
    if(SystemPerformance.AllTrades.Count >= 1) 
    {
    
    }
    Error Code CS0120:

    an object reference is required for the non-static field, method or property 'NinjaTrader.Cbi.SystemPerformance,AllTrades.get'

    any help appreciated.

    #2
    Hello delTik,

    The code you have appears correct.

    I have created a script to test this code and the script is able to compile, run, and print output.
    If you test this script on your end, do you get an error?

    Are you on the latest version of the Beta? (Beta 11)
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      ok thanks. updating now. can I get emails about new releases?

      code compiles in your sample but not in mine, declarations ok, will figure.

      Code:
      		protected override void OnPositionUpdate(Position position, double averagePrice, int quantity, MarketPosition marketPosition)
      		{
      			if (SystemPerformance.AllTrades.Count >= 1)
      				Print(SystemPerformance.AllTrades.Count.ToString());
      		}
      Last edited by delTik; 05-17-2016, 12:16 AM.

      Comment


        #4
        Hello delTik,

        Are you certain that code is what is generating the error?

        What is the error message? May we have a screenshot of the error message with the error column expanded so that we may read the message?

        We do not have a service to email about new releases. I recommend that you bookmark the release notes page to occasionally check the current release number.
        http://ninjatrader.com/support/helpG...ease_notes.htm

        Any mandatory updates for NinjaTrader 7 (and NinjaTrader 8 once there is a final release) are released as an Advisory which appears as a popup in NinjaTrader and also on our Advisory page.
        http://ninjatrader.com/Advisory
        Last edited by NinjaTrader_ChelseaB; 05-17-2016, 08:13 AM.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by helpwanted, Today, 03:06 AM
        1 response
        16 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        387 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X