Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

GetRealtimeOrder() returns null

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

    GetRealtimeOrder() returns null

    Hi,
    when following the guidance in the documentation, valid non-null orders can get returned as null from GetRealtimeOrder(). This wrecks the strategy's order and position management of course.
    I have had to check for this situation with the following code example.

    Code:
    private void UpdateOrdersToRealtime()		// Update per strategy for any relevant Order objects used in the strategy
    		{
    			Print("UpdatingOrdersToRealtime()");
    			if (LE != null)
    			{
    				Print("transition "+LE.ToString());
    				Order o = GetRealtimeOrder(LE);
    				if (o==null)
    					Print("Transition returned null");
    				else
    					LE = o;
    				Print(LE.ToString());
    			}
    		}
    Hope this helps somebody. It sucked up a few hours of my time figuring out what was going on.

    Cheers,
    saltminer.

Latest Posts

Collapse

Topics Statistics Last Post
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
0 responses
669 views
0 likes
Last Post Geovanny Suaza  
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
0 responses
378 views
1 like
Last Post Geovanny Suaza  
Started by Mindset, 02-09-2026, 11:44 AM
0 responses
111 views
0 likes
Last Post Mindset
by Mindset
 
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
0 responses
575 views
1 like
Last Post Geovanny Suaza  
Started by RFrosty, 01-28-2026, 06:49 PM
0 responses
580 views
1 like
Last Post RFrosty
by RFrosty
 
Working...
X