Believe you would see this because you don't have the Timer included thus it would need a bars object to sync to for the custom event call.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
OnTimer event
Collapse
X
-
jonnyg, did you work fully alongside the reference sample provided on this, this still compiles well for me here - the documentation will be overhauled and streamlined for NT7, sorry for the confusion.
Believe you would see this because you don't have the Timer included thus it would need a bars object to sync to for the custom event call.
-
Yes, I was working with the reference sample. I think there were two primary things that messed me up. #1 was the documentation example that uses only one argument (the CustomEvent object) and #2, I was not passing in the correct barsindex value. I'm happy now with my stuff working and the promise of NT7 and updated documentation on the way.
Comment
-
The V7.0 documentation on TriggerCustomEvent() is still incorrect.
And yes, I know there's a reference sample that is correct. But I don't always want to have to go to reference sample files instead of just looking in the help.
By the way, has anyone at NinjaTrader ever put together an installation file that contains all reference sample files so interested user's don't have to separately download all (43) files?
Option A:
If the NinjaTrader person who reads this is not pro-active, you may add both of these requests to your list.
Option B:
Instead of adding a 5-min job to a list that will take up 5-min of evaluation over-and-over again before someone finally decides to do this, just do it now..
Comment
-
Documentation updated.
Reference samples will not be installed by default as they are irrelevant for the majority of NT users. It does not make sense to bloat indicator/strategy lists for them with reference samples that don't do anything for them on charts. What could make sense is providing one large NS archive file to import all of the reference samples at once though. Thank you for the suggestion.Josh P.NinjaTrader Customer Service
Comment
-
Josh,Originally posted by NinjaTrader_Josh View PostDocumentation updated.
Thanks for getting this done. Nice to know someone's not only listening, but also getting these requests handled..
I'll be looking forward to seeing that.Originally posted by NinjaTrader_Josh View PostWhat could make sense is providing one large NS archive file to import all of the reference samples at once though.
Comment
-
Disregard trying to correlate the two into one overload. Just call your CustomEvent and pass the object afterwards. Easiest to just follow the reference sample.Originally posted by jonnyg View PostWhen I call:
TriggerCustomEvent(MyCustomHandler, myTimer.Interval);
as listed in the SampleCustomEvents.cs example, I get a compiler error:
Strategy\drawtest1.cs No overload for method 'TriggerCustomEvent' takes '2' arguments CS1501 - click for info 57 4
Also, using:
TriggerCustomEvent(new CustomEvent(MyCustomHandler), e);
gives the same error.
TriggerCustomEvent(MyCustomHandler, 1, "message");
compiles, but MyCustomHandler is never called. I know from debugging that TriggerCustomEvent *is* called.
Can you tell me which invocation I should be trying to use? I expect I'm making an error somewhere, but am confused by the differences/conflicts in the examples and in the documentation.
Thanks.
_________________
cheat codes
game cheat codes
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
85 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
48 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
29 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
32 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
67 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment