Alert("Volume Alert", NinjaTrader.Cbi.Priority.High,Instrument.FullName+": Volume above threshold", "Alert1.wav", 10, Color.White, Color.Yellow); if (Open[0]<=Close[0]) DrawArrowDown("tag_"+CurrentBar.ToString(), true, 0, High[0]+1*TickSize, Color.Red);
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
plot an oscillator on a signal
Collapse
X
-
plot an oscillator on a signal
I have an indicator that plots buy/sell signals How can i plot oscillator on a signals over time? the values of the oscillator can simply be 1 for buys and -1 for sells ... so basically an indicator on an indiocator....the code looks something like thisCode:Tags: None
-
Hello,
Thank you for the question.
I wanted to clarify this question, I will explain how I have understood the question, can you provide details to let me know if my thinking is correct?
I understand this as you have an indicator that is drawing arrows when your condition is true. You are trying to plot a line based on this indicators arrows or the more specifically the condition that causes the arrow. Is this correct?
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Hello,
For a 1 or 0 a bar generally is the easiest to see, for this the best example would be the VOL indicator that comes with NinjaTrader.
Looking at the code you will see 2 sections of code that contribute to plotting a value.
Code:protected override void Initialize() { Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "Volume")); Add(new Line(Color.DarkGray, 0, "Zero line")); }
Code:protected override void OnBarUpdate() { Value.Set(Volume[0]); }
You could simply set the value when the condition becomes true to 1 and that would make a 1 value bar plotted.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
3 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
1 view
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
6 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
Comment