Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Order Entry at specific level
Collapse
X
-
Thank you! That looks ok right now. I will write, if there are any further issues. Many thanks to fast support.Originally posted by NinjaTrader_Brandon View Post
-
Dear community,
how can I draw horizontal lines on every 100-level with an indicator. For example, I want a horizontal line on 9400, 9500, and 9600 in the FDAX and that for every 100 level. How can I draw these lines with an indicator?
Thanks in advance.
Comment
-
Hello arroganzmaschine,
Thanks for your post.
To do this you would need to use DrawHorizontalLine() and use a variable for the Y value.
You would then need to define the variable with a looping Command
Below I have provided a links to sections of our help guide on this.
DrawHorizontalLine() http://www.ninjatrader.com/support/h...zontalline.htm
Looping Commands http://www.ninjatrader.com/support/h...g_commands.htm
Comment
-
I started writing this indicator. It has no properties, just this logic:Originally posted by NinjaTrader_Brandon View PostHello arroganzmaschine,
Thanks for your post.
To do this you would need to use DrawHorizontalLine() and use a variable for the Y value.
You would then need to define the variable with a looping Command
Below I have provided a links to sections of our help guide on this.
DrawHorizontalLine() http://www.ninjatrader.com/support/h...zontalline.htm
Looping Commands http://www.ninjatrader.com/support/h...g_commands.htm
Now I want to have three parameters. One is the thickness, one is the color and one is the DashStyle of the line.Code:DrawHorizontalLine("tag" + yVar, yVar, Color.AntiqueWhite);
I tried to insert this code into the indicator:
That also works. But when I try to define the parameters region like this:Code:#region Variables // Wizard generated variables private Color userColor = Color.Coral; private DashStyle userStyle = DashStyle.Solid; private int lineWidth = 2; // User defined variables (add any user defined variables below) #endregion
it doesn't work and the compiler says, that lineWidth is already defined in my Indicator. But I haven't done anything. So how can I set properties manually to my indicator like the ones I defined "private"?Code:#region Properties public int lineWidth { get { return lineWidth; } set { this.lineWidth = value; } } #endregion
Thanks in advance.
Comment
-
-
Hi arroganzmaschine,
The lineWidth has already been declared in #region Variables.
If you would like a public variable that returns the private variable, then you need a unique name.
Typically I just use a capital letter to begin a public variable and a lower case letter for the private variable.
For example:
[Description("Width of line")]
[Category("Parameters")]
public int LineWidth
{
get { return lineWidth; }
set { this.lineWidth = value; }
}Chelsea B.NinjaTrader Customer Service
Comment
-
Thank you. That solved my Problem.
Is it possible to give an alert if the price is five Ticks near a horizontal line?
Comment
-
And how can I get all horizontal Lines i draw with the price?Originally posted by NinjaTrader_Cal View PostArroganzmaschine,
You want to test when the price is near the horizontal line as such -
Code:if(Close[0] > horizontallineprice - 5 * TickSize && Close[0] < horizontallineprice + 5 * TickSize && Close[0] != horizontalprice) { //do something }
Comment
-
Hello arroganzmaschine,
Below is some unsupported code to print horizontal line y-axis values.Originally posted by arroganzmaschine View PostAnd how can I get all horizontal Lines i draw with the price?
foreach(IDrawObject draw in DrawObjects)
{
if (draw.DrawType == DrawType.HorizontalLine)
{
IHorizontalLine hLine;
hLine = (IHorizontalLine) draw;
if (hLine == null)
return;
Print(hLine.Y);
}
}Chelsea B.NinjaTrader Customer Service
Comment
-
Hello,
While I'm not sure what is in this screenshot, there is a divergence indicator that has a histogram on our forums.
This is the D3SpotterV3 indicator.
http://www.ninjatrader.com/support/f...php?linkid=594Chelsea B.NinjaTrader Customer Service
Comment
-
That looks quite good. But I think the one in my screenshot seems to be an oscillator or something else. Do you have anymore suggestions?Originally posted by NinjaTrader_ChelseaB View PostHello,
While I'm not sure what is in this screenshot, there is a divergence indicator that has a histogram on our forums.
This is the D3SpotterV3 indicator.
http://www.ninjatrader.com/support/f...php?linkid=594
Thank you so far!
Comment
-
It's something like an oscillator, but I also don't know the source.Originally posted by NinjaTrader_ChelseaB View PostHi Max,
I've asked around here at the office but we are not recognizing this indicator. You may have more luck asking the person who posted this image which indicator is being used.
Thank you very much.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
93 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
48 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
31 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
34 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
69 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment