Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Order Entry at specific level
Collapse
X
-
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.htmBrandonNinjaTrader Customer Service
Comment
-
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
Code:DrawHorizontalLine("tag" + yVar, yVar, Color.AntiqueWhite);
I tried to insert this code into the indicator:
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
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
-
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,
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
-
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
-
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 llanqui, 03-05-2025, 06:03 AM
|
17 responses
105 views
0 likes
|
Last Post
![]()
by bltdavid
Yesterday, 11:12 PM
|
||
Started by IDumpedCinderella, 03-12-2025, 11:34 PM
|
2 responses
25 views
0 likes
|
Last Post
![]()
by b.j.d
Yesterday, 10:54 PM
|
||
Started by carnitron, 02-26-2025, 10:00 PM
|
6 responses
54 views
0 likes
|
Last Post
![]()
by carnitron
Yesterday, 10:19 PM
|
||
Started by davian05, 12-31-2024, 05:05 AM
|
10 responses
242 views
1 like
|
Last Post
![]() |
||
Started by timmbbo, 06-06-2022, 09:12 PM
|
4 responses
282 views
0 likes
|
Last Post
![]()
by Fertryd2
Yesterday, 06:42 PM
|
Comment