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
% Grid Line
Collapse
X
-
If you use any of the provided Draw() methods, you must put in an absolute y value. Provided that the indicator was showing a value of 0 through 100 (such as stochastics) then you would just put in a value of 80 for the y value parameter in a Draw() method.
If you want to draw a line at 80% level in reference to the overall drawing space (pixels) this can be done by overriding the Plot() method. Doing this is advanced and requires some understanding of the .NET graphics class. You can see the CustomPlotSample indicator for reference.RayNinjaTrader Customer Service
-
Fair enough.
I would like to plot on the "Zero Line" a changing line. When the Regression Channel is rising I would like to plot a "Green" Line, when the Regression Line is falling I would like to plot a "Red" Line. I'm having problems implementing this. I've attached a the indicator so you could see what I'm trying to do.
edit: That's a bad example, as I don't have the zero line changing colors. But I think you get the idea.
Comment
-
Would just having the zero line dynamically change color be sufficient? If yes, just do something like:
if (rising)
Lines[0].Pen.Color = Color.Green;
else
Lines[0].Pen.Color = Color.Red;
Where [0] references the index where the zero line resides in the Lines collection. If you only have one line in the indicator, it would be index 0.RayNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by f.saeidi, Today, 10:19 AM
|
0 responses
0 views
0 likes
|
Last Post
by f.saeidi
Today, 10:19 AM
|
||
Started by kujista, Today, 06:23 AM
|
4 responses
14 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by traderqz, Yesterday, 09:06 AM
|
2 responses
16 views
0 likes
|
Last Post
by traderqz
Today, 09:48 AM
|
||
Started by traderqz, Today, 12:06 AM
|
3 responses
6 views
0 likes
|
Last Post Today, 09:41 AM | ||
Started by RideMe, 04-07-2024, 04:54 PM
|
5 responses
28 views
0 likes
|
Last Post Today, 08:48 AM |
Comment