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
How to get a series from a drawobject
Collapse
X
-
How to get a series from a drawobject
I'm currently working on an indicator. As a part of that indicator, I have a Line and a TrendChannel being drawn. I want to use CrossAbove and CrossBelow to play a sound to alert the user of a specific change. However, I can't seem to figure out how to get a series from Line or TrendChannel in order to use CrossAbove and CrossBelow. Any help would be greatly appreciated.Tags: None
-
Thanks for the info, Chelsea. However, if that's the case, how am I supposed to do something like this:
Code:... if (CrossAbove(High, <Line or TrendChannel>, 1)) { <do something>; } else if (CrossBelow(Low, <Line or TrendChannel>, 1)) { <do something else>; } ...
Code:CrossAbove(ISeries<double> series1, ISeries<double> series2, int lookBackPeriod) CrossAbove(ISeries<double> series1, double value, int lookBackPeriod)
Code:CrossBelow(ISeries<double> series1, ISeries<double> series2, int lookBackPeriod) CrossBelow(ISeries<double> series1, double value, int lookBackPeriod)
Comment
-
Hello learningnt,
CrossAbove()/CrossBelow() could check when the price is crossing a specific anchor but not a point along the line.
The Alerts for manually drawn lines indicator for NinjaTrader 7 had custom logic to figure out when the price was crossing diagonal lines that are not horizontal.
Updated 9-28-11: Used a simpler approach for horizontal lines and improved "no alert" message handling so that these messages should always be correctly removed. ========= This indicator will alert when the most recent bar crosses manually drawn lines. Works on lines, rays, horizontal lines, and extended lines. Apply the indicator to a chart and manually […]
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.Chelsea B.NinjaTrader Customer Service
Comment
-
So, when creating a Line or TrendChannel, we choose anchor points on either end, and it draws a line between those anchor points. This then makes it impossible to tell if we have crossed above or below that Line or TrendChannel as we're talking about some point between anchors and not the anchors themselves. Am I interpreting that correctly? Also, I'm using NT8, not NT7.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by judysamnt7, 03-13-2023, 09:11 AM
|
4 responses
57 views
0 likes
|
Last Post
by DynamicTest
Today, 08:25 PM
|
||
Started by ScottWalsh, Today, 06:52 PM
|
4 responses
36 views
0 likes
|
Last Post
by ScottWalsh
Today, 07:40 PM
|
||
Started by olisav57, Today, 07:39 PM
|
0 responses
7 views
0 likes
|
Last Post
by olisav57
Today, 07:39 PM
|
||
Started by trilliantrader, Today, 03:01 PM
|
2 responses
19 views
0 likes
|
Last Post
by helpwanted
Today, 07:25 PM
|
||
Started by cre8able, Today, 07:24 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 07:24 PM
|
Comment