Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Market Analyzer User Defined Methods
Collapse
X
-
Market Analyzer User Defined Methods
I am trying to write several columns for the Market Analyzer that will print the date of various analysis events. I am finding this quite challenging, but I think not impossible. How do I create an analysis technique in the a Market Analyzer 'UserDefinedMethods' folder and then call it from a custom script in the Market Analyzer folder?Tags: None
-
Hello Hawk Arps,
Thank you for your post.
I would refer you to the documentation on User Defined Methods at the following link: http://ninjatrader.com/support/helpG...ed_methods.htm
If you have any questions please let me know.
-
Thank you, PatrickH. However this doesn't seem to help me. I am coding in the MarketAnalyzer namespace because I cannot return dates to the MarketAnalyzer from the Indicator namespace (only numbers). Within the MarketAnalyzer namespace I am including the OnBarUpdate() method. Within that method I have:
myValue=myMethod(input); where myMethod() is stored in the MarketAnalyzer/UserDefinedMethods folder. I get a compilation error stating "The name 'MyMethod' does not exist in the current context". My end goal is to identify a signal and print the date of that signal to the Market Analyzer.
Comment
-
You cannot declare a method directly in a namespace.Originally posted by Hawk Arps View PostThank you, PatrickH. However this doesn't seem to help me. I am coding in the MarketAnalyzer namespace because I cannot return dates to the MarketAnalyzer from the Indicator namespace (only numbers). Within the MarketAnalyzer namespace I am including the OnBarUpdate() method. Within that method I have:
myValue=myMethod(input); where myMethod() is stored in the MarketAnalyzer/UserDefinedMethods folder. I get a compilation error stating "The name 'MyMethod' does not exist in the current context". My end goal is to identify a signal and print the date of that signal to the Market Analyzer.
ref: https://msdn.microsoft.com/en-us/lib...v=vs.120).aspx
Comment
-
Hello Hawk Arps,
Thank you for your response.
Here is a basic example:
In your UserDefinedMethods:
In your custom column:Code:namespace NinjaTrader.MarketAnalyzer { /// <summary> /// This file holds all user defined quoteboard column methods. /// </summary> partial class Column { public void ShowPrint() { Print("User Defined Method called"); } } }
Code:public class MyColumn : NinjaTrader.MarketAnalyzer.Column { /// <summary> /// This method is used to configure the market analyzer column and is called once before any event mathod is called. /// </summary> protected override void Initialize() { CalculateOnBarCloseConfigurable = false; RequiresBars = false; } /// <summary> /// Called on each incoming market data tick. /// </summary> /// <param name="e"></param> protected override void OnMarketData(MarketDataEventArgs e) { ShowPrint(); }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
64 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
41 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
22 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
25 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
52 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment