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
Third party S/R levels
Collapse
X
-
Third party S/R levels
I want to develop a strategy in NT7 that identifies lines from within NT. In other words, if an indicator plots horizontal lines, (fibs for example) I want to create a strategy that whenever horizontal lines are created by some indicator x, then execute the trade (even if the source behind those lines is unknown). There must be something within NT that can identify/detect when horizontal lines are plotted.Tags: None
-
Hello RJBen,
Objects are only available outside of a class in C# if they are made public.
You may be able to create a public array to hold these objects and get information about the objects on each bar update. (It may be necessary to call Update() in the get).
I would recommend using a List object.Chelsea B.NinjaTrader Customer Service
-
Originally posted by NinjaTrader_ChelseaB View PostHello RJBen,
Objects are only available outside of a class in C# if they are made public.
You may be able to create a public array to hold these objects and get information about the objects on each bar update. (It may be necessary to call Update() in the get).
I would recommend using a List object.
Comment
-
Hello RJBen,
The code below is general C# is and not specific to NinjaScript (meaning this is not documented in the help guide and isn't guaranteed).
The idea would be to create an array to hold the drawing objects.
Code:private List<IDrawObject> myDrawingObjects;
Code:myDrawingObjects = new List<IDrawObject>();
Code:[XmlIgnore()] [Browsable(false)] public List<IDrawObject> MyDrawingObjects { get { Update(); return myDrawingObjects; } set { } }
Code:myDrawingObjects.Add(DrawLine("myLineb", 30, High[0] + 2 * TickSize, 0, High[0] + 2 * TickSize, Color.Green));
Code:if (MyIndicator().MyDrawingObjects != null) { foreach (IDrawObject draw in MyIndicator().MyDrawingObjects) { if (draw is ILine) { ILine line = draw as ILine; Print(string.Format("{0}", line.StartY)); } } }
Chelsea B.NinjaTrader Customer Service
Comment
-
Next question, so long as these are levels on a chart, can we set Display in Data box to true and access the information from the Data box? Instead of trying to detect a level from indicator X can we instead extract the information from the Data box? It too has the price levels that I need.
Comment
-
Hi Chelsea,
I have a set of proprietary indicators that plot potential support and resistance levels based on market volatility. I put several different chart types on one chart (2 Range, 2 Time and 2 Volume). I made each chart a different color. Then I am looking for areas of confluence between those chart types. I've included a screenshot from yesterdays trading on the ES. I want to have an automation strategy created. But I need to be able to put the plots into the strategy to compare and find those areas of confluence as the source codes are closed. The Data box separates everything by chart types, colors and price values. So if I can extract that information, like into a spreadsheet, I can separate it by colors and compare price levels for areas of confluence. Can it be done?Last edited by RJBen; 08-15-2017, 08:21 AM.
Comment
-
Hello RJBen,
Plots are intended to be called from other scripts when the data series are made public.
For an example, take a look at how the MACD indicator works. There are three plots in this, the Default plot, the Avg plot, and the Diff plot.
For example:
Print(MACD(12, 26, 9).Avg[0]);
This would print the most recent bar's value for the Avg plot in the MACD.
Are you creating public data series for your plots?Chelsea B.NinjaTrader Customer Service
Comment
-
Hello RJBen,
This means using the public access modifier declaring the series within the scope of the class.
In the MACD this is in the region Properties on lines 105 through 124.
The example below shows exposing objects with the public access modifier.
The Values[plot index] series is what you wanting to expose.
If you are not a programmer you can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.Chelsea B.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_ChelseaB View PostIf you are not a programmer you can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
Comment
-
Hello RJBen,
This is Ryan L. from the NinjaTrader Ecosystem responding on behalf of my colleague Chelsea.
You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!
You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third party services for NinjaTrader all pricing and support information will need to be obtained through the consultant.
This 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 companies and services 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.
Please let me know if you have any questions, concerns or if I can provide any further assistance by responding to this thread at your convenience.Ryan L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bmartz, Today, 09:30 AM
|
2 responses
11 views
0 likes
|
Last Post
by bltdavid
Today, 11:24 AM
|
||
Started by f.saeidi, Today, 11:02 AM
|
1 response
3 views
0 likes
|
Last Post Today, 11:08 AM | ||
Started by geotrades1, Today, 10:02 AM
|
4 responses
12 views
0 likes
|
Last Post
by geotrades1
Today, 11:08 AM
|
||
Started by rajendrasubedi2023, Today, 09:50 AM
|
3 responses
16 views
0 likes
|
Last Post Today, 10:57 AM | ||
Started by lorem, Today, 09:18 AM
|
2 responses
11 views
0 likes
|
Last Post Today, 10:55 AM |
Comment