Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Errors CS1001 and CS1525

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

    Errors CS1001 and CS1525

    Hi!

    I'm just using MultiTime Frame Sample included in NT to learn about it. I tweaked it a bit and I got:

    Code:
    if (SerCavaTrend(BarsArray[1], 50,-50)[0] == 1.) //Error CS1001
    	{
    	// Checks for a OverSold condition on the primary Bars object and enters long
    	if (SercavaT(10)[2] > SercavaT(10)[1] && SercavaT(10)[1] < SercavaT(10)[0] && SercavaT(10)[1] < -50 ) //Error CS1525
    	EnterLong();
    	}
    NinjaScript File Error Code Line Column
    Strategy\SignalsTrend.cs Invalid expression term ')' CS1525 - click for info 68 115
    Strategy\SignalsTrend.cs Identifier expected CS1001 - click for info 65 51

    Any ideas?

    Thanks in advance,

    Sergio

    #2
    Hello,

    Please try removing the period at the end of your first statement.

    This should read if (SerCavaTrend(BarsArray[1], 50,-50)[0] == 1)

    Please let me know if there are further errors after doing so.
    MatthewNinjaTrader Product Management

    Comment


      #3
      It worked, thanks.

      Sergio

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      65 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      35 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      59 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      62 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Working...
      X