Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error when adding For loop in OnStartUp()

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

    Error when adding For loop in OnStartUp()

    I have a for loop in OnStartup:-

    Code:
    protected override void OnStartUp()
    		{
        	 
    			
    			if(Instrument.Expiry.Year > 2013 && Instrument.Expiry.Month > 9 || Instrument.Expiry.Year == 2013 && Instrument.Expiry.Month > 9)
    			{
    				List<int> fgblU13Win = new List<int> ()
    					{
    						8,18,14,41,16,17,33,34,29,61,92,29,8,30,25,16,14,23,27,10,58,19,6,11,8,16,7,43,22,33,8,56,13,30,14,58,21,28,37,28,15
    					};
    					
    				For(int i = 0; i < fgblU13Win.Count; i++)
    					{
    					mfeWinnerList.Add(fgblU13Win[g]);
    					}
    
    			}
    But im getting errors when compiling it but in not sure why, Here are the errors:-


    Strategy\PivOscDiv.cs Invalid expression term 'int' CS1525 - click for info 144 13
    Strategy\PivOscDiv.cs ; expected CS1002 - click for info 144 43
    Strategy\PivOscDiv.cs Invalid expression term ')' CS1525 - click for info 144 43
    Strategy\PivOscDiv.cs ; expected CS1002 - click for info 144 44

    #2
    GKonheiser, only thing standing out visual to me is the capitalized For when it should be for.

    Comment


      #3
      Oh that was stupid of me, thx, just didnt see it

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X