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 Davidtowleii, Today, 12:15 AM
        0 responses
        3 views
        0 likes
        Last Post Davidtowleii  
        Started by guillembm, Yesterday, 11:25 AM
        2 responses
        9 views
        0 likes
        Last Post guillembm  
        Started by junkone, 04-21-2024, 07:17 AM
        9 responses
        68 views
        0 likes
        Last Post jeronymite  
        Started by trilliantrader, 04-18-2024, 08:16 AM
        4 responses
        20 views
        0 likes
        Last Post trilliantrader  
        Started by mgco4you, Yesterday, 09:46 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X