My intent is to use this indicator in the market analyzer which scan hundreds of instruments and return the D price of a XABCD pattern.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Prevent Plot unless value changes
Collapse
X
-
Prevent Plot unless value changes
I currently have a custom harmonic indicator with a custom DataSeries. How do I prevent this custom DataSeries from being plotted unless a new price "D" has been generated?
My intent is to use this indicator in the market analyzer which scan hundreds of instruments and return the D price of a XABCD pattern.Tags: None
-
Hello,
Thank you for the question.
I would like to know, are you referring to preventing the DataSeries from plotting in a chart or are you asking how to filter rows that the DataSeries does not = X in the Market Analyzer?
If you are trying to prevent the Market Analyzer from showing rows, you could potentially use the Filter condition in the MA. It depends on the value you are getting out of the indicator, if this is a basic number like a 1 for on and 0 for off this would be very easy, if it is a range you may have to make a few conditions.
Can you provide some more details on this?
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
I am not trying to filter and this is a DataSeries for the market analyzer.
Right now the last price D of the pattern is constantly reprinted (verified with output window). What I am trying to do is only plot/print the value once until a new price pattern is identified.
For example, if there is no valid pattern, output (plot) -1 so that I could then filter out the instruments which == -1.
Comment
-
Hello,
Thank you for the clairification.
There are two ways to do this, they are both exactly the same except the first you need the indicators original source code.
Essentially what you will need to do is create a custom plot for the MA specifically.
This plot would need to be set to -1 at the beginning of every OnBarUpdate so in the MA it will report a -1 if there is no change.
You would need to declare a variable that will hold the existing value of the indicator.
In the OnBarUpdate you would need to check if the current indicator value is == to the stored value, if it is not == to the stored value you would set the plot to 1 to create a signal. The next time OnBarUpdate runs it would return the plot to -1.
This would be one way of doing this, you may need to change the logic around because if this were to run with CalculateOnBarClose = false it would only show the row for a split second. If it was COBC = true, it would show for how long it takes for the next bar to close.
If you do not have the original source, like i said the process would be the same but you would instead create a new indicator that reads your harmonic indicator value and compares it. You would then load the New indicator into the MA column rather than the harmonic indicator.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Johndc, Today, 04:39 AM
|
0 responses
2 views
0 likes
|
Last Post
by Johndc
Today, 04:39 AM
|
||
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
8 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
12 views
0 likes
|
Last Post Today, 02:00 AM | ||
Started by Mariawilcoxi, Today, 01:32 AM
|
0 responses
5 views
0 likes
|
Last Post
by Mariawilcoxi
Today, 01:32 AM
|
||
Started by gleichnerany, Today, 01:17 AM
|
0 responses
5 views
0 likes
|
Last Post
by gleichnerany
Today, 01:17 AM
|
Comment