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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      66 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      149 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      99 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X