PlotHAO.Set(((PlotHAO[1]+joeHACindicator3(1)[1])/2));"joeHAOindicator.cs
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
indicator fails to compile with code 'CS103 - variable not declared'
Collapse
X
-
indicator fails to compile with code 'CS103 - variable not declared'
the attached indicator fails to compile with error 'the name 'PlotHAO' does not exist in the current context' and code 'CS103 - variable not declared'. I have unsuccessfully spent hours trying in various ways to research and fix the error. backups I made within NT failed to work with an error something like 'restoration would corrupt the system'. Any help will be much appreciated. the file for the indicator code is attached. the offending line of code at line 47 is "
PlotHAO.Set(((PlotHAO[1]+joeHACindicator3(1)[1])/2));"joeHAOindicator.cs
Tags: None
-
Problem resolved by myself
I failed to notice in the error message that the error was occurring in a different indicator than the indicator being compiled. That is, the code in another newly created indicator that is almost identical in name and code to the one being compiled was the indicator with the problem. everything works ok now that I have gone to the new indicator and fixed the problem there.
-
Yep - all code must compile in <=NT7...Originally posted by joemiller View PostI failed to notice in the error message that the error was occurring in a different indicator than the indicator being compiled. That is, the code in another newly created indicator that is almost identical in name and code to the one being compiled was the indicator with the problem. everything works ok now that I have gone to the new indicator and fixed the problem there.
From what I saw in NT8 pre-video - this will NOT be case (UNLESS of course, the code depends on the bad code, independent scripts that fail to compile won't matter)...
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
599 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
345 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
558 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment