I am new to ninjatrader having some difficulty, I would like to know if anyone has the cci indicator with changing color when over bought and over sold.
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
CCI with changing color
Collapse
X
-
Hello Bdg820,
Thanks for posting today.
We do not do custom coding on the support side. However, this is easy enough that I created a sample CCI indicator for you with the desired behavior.
The SampleCCIColored indicator will change the plot to green when the CCI drops below 0 and plots red when the CCI indicator is above 0 after the bar update. You can change these colors by adapting the code to your needs.
To import this NinjaScript follow these steps.- From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
- Select the file you want to import
- Press the "Open" button
Please let us know if we may be of further assistance for anything NinjaTrader.Attached FilesAlex G.NinjaTrader Customer Service
-
Hello Bdg820,
Thanks for the reply.
This change can be made inside the code of the indicator provided.
- From the Control Center>Tools>Edit NinjaScript>Indicators
- Double mouse click the SampleCCIColored indicator
- Locate lines 58 and 62 with this code.
-
Code:
if(Value[0] > 0)
-
Code:
if(Value[0] < 0)
- Change the value of the conditional statement from 0 to 100 and -100 like the code below
-
Code:
if(Value[0] > 100)
-
Code:
if(Value[0] < -100)
- Right mouse click>Compile
- Close the Indicator editor
Reload the indicator on the chart or press F5 on the chart to reload the active indicator.
These values can be changed to match which ever CCI level you wish to change the color of plot on.
Please let us know if we may be of further assistance for anything NinjaTrader.Alex G.NinjaTrader Customer Service
Comment
-
Hi,
I downloaded the Sample CCI COloured Indicator and it is fine. However, i would like to have the GREEN colour above and the REd below. I went into the editor and I changed this and saved it. I guessed that just changing the colours it woudl work but still it appears with red on the top and green below. How can I do it please? many thanks
}
//condition statement to change color of CCI plot if over bought or over sold
if(Value[0] > 0)
{
PlotColors[0][0] = Color.Green;
}
if(Value[0] < 0)
{
PlotColors[0][0] = Color.Red;
Comment
-
Originally posted by NinjaTrader_CodyB View PostHello,
Can you clarify if you are adding this indicators in a strategy or are you adding them to a chart through the indicators menu?
I am adding it to a Range chart with the indicator menu. On top of the chart,
Actually, I add the Heiken Ashi, the CCI and the Williams %R on the chart.
I am not sure if I should use True or False on Calculate to close bar.
many thanks
Comment
-
Hello,,
Unfortunately we can not make a recommendation on which one to use as this is decision is completely up to the user. This depends on if you want the calculations to occur intrabar or if you want them to occur at the end of every bar. If you decide to have CalculateOnBarClose set to false I would like to note that this is more performance intensive.Cody B.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_AlexG View PostHello Bdg820,
Thanks for posting today.
We do not do custom coding on the support side. However, this is easy enough that I created a sample CCI indicator for you with the desired behavior.
The SampleCCIColored indicator will change the plot to green when the CCI drops below 0 and plots red when the CCI indicator is above 0 after the bar update. You can change these colors by adapting the code to your needs.
To import this NinjaScript follow these steps.- From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
- Select the file you want to import
- Press the "Open" button
Please let us know if we may be of further assistance for anything NinjaTrader.
I'm trying to import the indicator sampleCciColored into Ninjatrader 8, it's saying its incompatible. Can you please help.
Thanks,
Bdg820
Comment
-
Originally posted by NinjaTrader_AlexG View PostHello Bdg820,
Thanks for posting today.
We do not do custom coding on the support side. However, this is easy enough that I created a sample CCI indicator for you with the desired behavior.
The SampleCCIColored indicator will change the plot to green when the CCI drops below 0 and plots red when the CCI indicator is above 0 after the bar update. You can change these colors by adapting the code to your needs.
To import this NinjaScript follow these steps.- From the Control Center window select the menu File > Utilities > Import NinjaScript to open the Import NinjaScript dialog window
- Select the file you want to import
- Press the "Open" button
Please let us know if we may be of further assistance for anything NinjaTrader.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Mestor, Today, 03:15 AM
|
0 responses
1 view
0 likes
|
Last Post
by Mestor
Today, 03:15 AM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
11 responses
305 views
0 likes
|
Last Post
by z.franck
Today, 02:29 AM
|
||
Started by Padan, Today, 02:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by Padan
Today, 02:02 AM
|
||
Started by bukowa, 11-09-2023, 06:07 PM
|
20 responses
407 views
0 likes
|
Last Post
by Adfra
Today, 01:36 AM
|
||
Started by yertle, Yesterday, 05:49 PM
|
2 responses
11 views
0 likes
|
Last Post
by yertle
Today, 12:12 AM
|
Comment