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
-
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:
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 cmtjoancolmenero, Yesterday, 03:58 PM
|
1 response
17 views
0 likes
|
Last Post Today, 06:16 AM | ||
Started by benmarkal, Yesterday, 12:52 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 05:22 AM | ||
Started by helpwanted, Today, 03:06 AM
|
1 response
19 views
0 likes
|
Last Post Today, 03:35 AM | ||
Started by Brevo, Today, 01:45 AM
|
0 responses
11 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
244 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
Comment