What is the actual method that is not supported? How can I get more details about this error?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
**NT** Error on triggering custom event for strategy Specified method is not supporte
Collapse
X
-
-
private void CheckStopTimerEventHandler(object sender, System.Timers.ElapsedEventArgs e)
{
if (!System.Threading.Monitor.TryEnter(m_stopLock))
{
return;
}
try
{
Parent.TriggerCustomEvent(UpdateStopTimer, 0, null);
}
catch (Exception ex)
{
Parent.Print(ex.Message);
Parent.Print(ex.StackTrace);
}
finally
{
System.Threading.Monitor.Exit(m_stopLock);
}
}
Note that this method is called by System.Timers.Timer once per 1 second
Comment
-
Hello alex.nt,
The try and catch does appear to be OK.
The issue may be in the UpdateStopTimer method.
May I have a reduced version of your script with only the code necessary to reproduce this error?
To export your script do the following:
- Click File -> Utilities -> Export NinjaScript
- Enter a unique name for the file in the value for 'File name:'
- Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
- Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message
By default your exported file will be in the following location:- (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>
Below is a link to the help guide on Exporting NinjaScripts.
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by pibrew, Today, 06:37 AM
|
0 responses
0 views
0 likes
|
Last Post
by pibrew
Today, 06:37 AM
|
||
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
Comment