Protected override void Initialize ()
{
Add(new Plot(new Pen(Color.Yellow, 2), PlotStyle.Hash, "Today High"));
Add(new Plot(new Pen(Color.Yellow, 2), PlotStyle.Hash, "Today Low")); }
Protected override void OnBarUpdate()
{
double TodayHi = CurrentDayOHL().CurrentHigh[0];
double TodayLo = CurrentDayOHL().CurrentLow[0];
}
#region Properties
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries TodayHi
{
get { return Values[0]; }
}
[Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
[XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
public DataSeries TodayLo
{
get { return Values[1]; }
}
#endregion
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Plot from another indicator
Collapse
X
-
Plot from another indicator
From another indicator, I'm calling and plotting the Current High and Low fromt the CurrentDayOHL indicator. Why it is not plotting? Am I using the wrong function/syntax? Thanks in advance.
Code:Tags: None
-
You haven't set your plots..Originally posted by 2Look4me View PostFrom another indicator, I'm calling and plotting the Current High and Low fromt the CurrentDayOHL indicator. Why it is not plotting? Am I using the wrong function/syntax? Thanks in
Look in the code here to see an example
-
Hello 2Look4me,
Thank you for writing in. You would need to actually set the plot values for them to draw on the chart. For example:
Please let me know if I may be of further assistance.Code:protected override void OnBarUpdate() { double TodayHi = CurrentDayOHL().CurrentHigh[0]; Values[0].Set(TodayHi); double TodayLo = CurrentDayOHL().CurrentLow[0]; Values[1].Set(TodayLow); }Michael M.NinjaTrader Quality Assurance
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
131 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
74 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
117 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
111 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
89 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment