TIA!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how do i go about creating this indicator?
Collapse
X
-
how do i go about creating this indicator?
i would like the indicator to generate a symbol each time a bar closes below the close of 4 bars ago and a different symbol each time a bar closes above the close of 4 bars ago. and if there are 9 bars which consecutively close below the close of 4 bars ago or if there are 9 bars which consecutively close above the close of 4 bars ago, to draw a line on the chart representing the true high of those 9 bars and the true low of those 9 bars respectively?
TIA!Tags: None
-
kaywai, a good start are our indicator coding tutorials - http://www.ninjatrader-support.com/H...verview18.html
For the consecutive closes condition, you could work with CountIf() - http://www.ninjatrader-support.com/H...6/CountIf.html
-
if (Close[0] > Close[4])
{
DrawArrowUp("MyArrowUp"+CurrentBar, 0, Low[0]- (TickSize) , Color.Blue);
}
if (Close[0] < Close[4])
{
DrawArrowDown("MyArrowDown"+CurrentBar, 0, High[0]+ (TickSize) , Color.Red);
}
here is some drawline code:
DrawLine("Line1"+ CurrentBar,false, 2, Low[1]+ (TickSize*2), 0, Low[1]+ TickSize *2, Color.Red, DashStyle.Solid, 4)
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
333 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment