Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Color Change based on a Moving Average
Collapse
X
-
Color Change based on a Moving Average
Not sure, if it's being asked around on the site but curious if anyone has an indicator where the price line would change color depending on if it's above or below the moving average. Similar to the picture below.
Tags: None
-
Hello harryodell55, thanks for your post.
The "Price Line" indicator comes with the platform by default and can be modified to change the line's color when above/below an indicator value. To save a copy of the indicator open up the NinjaScript Editor> Open the PriceLine file> right click> Save As> give the script a different name.
Unfortunately, I do not know of an existing indicator that I could provide for an example.
Please let me know if I can assist any further.
Chris L.NinjaTrader Customer Service
-
Comment
-
Hello harryodell55, thanks for your reply.
Unfortunately, I will not be able to provide a full example of the changes. The new PriceLine script needs to add the EMA/SMA indicator to get price updates from it in OnBarUpdate. When the value of the Close[0] price is above/below the MA value, the indicator needs to use a different brush color, so you will have to set up an extra brush in the script as well. This post will remain open to any member of the community that wishes to help out as well.
Please let me know if I can assist any further.Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by varsha, Today, 06:33 PM
|
0 responses
6 views
0 likes
|
Last Post
![]()
by varsha
Today, 06:33 PM
|
||
Started by NtFan, Today, 04:12 PM
|
1 response
8 views
0 likes
|
Last Post
![]()
by NtFan
Today, 04:30 PM
|
||
Started by futurenow, Today, 01:44 PM
|
2 responses
37 views
0 likes
|
Last Post
![]()
by voltation
Today, 05:31 PM
|
||
Started by Gerik, Today, 12:44 PM
|
1 response
14 views
0 likes
|
Last Post
|
||
Started by autogenix, Today, 01:01 PM
|
3 responses
20 views
0 likes
|
Last Post
|
Comment