protected override void OnBarUpdate() { // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. if (MACD(12,26,9).Diff[0] > 0 && MACD(12,26,9)[0] > 0) BarColor = Color.Green; else if (MACD(12,26,9).Diff[0] < 0 && MACD(12,26,9)[0] < 0) BarColor = 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
Assigning indicator values
Collapse
X
-
Assigning indicator values
Hello, I have the snippet of code where the following conditions paint the bar red or green:
Code:Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by knighty6508, Today, 01:20 AM
|
1 response
6 views
0 likes
|
Last Post Today, 01:54 AM | ||
Started by franatas, Today, 01:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by franatas
Today, 01:53 AM
|
||
Started by knighty6508, Today, 01:17 AM
|
0 responses
6 views
0 likes
|
Last Post
by knighty6508
Today, 01:17 AM
|
||
Started by tierraany, Today, 01:06 AM
|
0 responses
4 views
0 likes
|
Last Post
by tierraany
Today, 01:06 AM
|
||
Started by Wilmarobyi, Today, 12:48 AM
|
0 responses
3 views
0 likes
|
Last Post
by Wilmarobyi
Today, 12:48 AM
|
Comment