Occurs when loading the strategy from the Strategies panel. It doesn't appear in the Output so it's difficult yo isolate where this error is being triggered. Any insight on how to identify the culprit? thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Unhandled exception: Value cannot be null. Parameter name: dependencyObject
Collapse
X
-
Unhandled exception: Value cannot be null. Parameter name: dependencyObject
I'm having difficulty tracing this error message: Unhandled exception: Value cannot be null. Parameter name: dependencyObject
Occurs when loading the strategy from the Strategies panel. It doesn't appear in the Output so it's difficult yo isolate where this error is being triggered. Any insight on how to identify the culprit? thanksTags: None
-
Hello pman777,
Thanks that helps.
Based on the given information I would guess this relates to the button logic in the script. A dependency object would be part of the UI framework being used, and Value cannot be null hints that you are trying to do something with the UI but it is null.
My guess would be that the ChartControl is being used in some way and the ChartControl specifically is null when using the Control Center to apply a strategy. Your button adding logic will need specific null checks to avoid this situation in the control center because there is no chart window.
If you have a sample of the button adding logic, we may be able to just see what is causing the error by looking at what objects are used and what has the possibility of being null. Alternatively you could use Print statements to isolate what line of code is throwing the error to further isolate the issue.
I look forward to being of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment