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 SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      47 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      22 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      15 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      21 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      23 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X