Attached the error.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy builder to enter using indicator color
Collapse
X
-
Hello neshnix89,
Thank you for your reply.
You've simply pasted the entire example into your script and now you have 2 OnBarUpdate methods, which is causing the error. Showing the code within OnBarUpdate in the example was simply meant to show you where within the script you would want to put that logic, not that you're meant to copy the code wholesale.
You will need to remove that copied in OnBarUpdate and then use that logic within it in your existing OnBarUpdate method.
Please let us know if we may be of further assistance to you.
Comment
-
Hi Kate,
I would like to add anothet indicator called HACO i got from appshared in ecosystem. However im not able to choose the condition when the color of highloted area become green or red. Can you help to modified it to make it exposed so that i can choose the color in my strategy? Appreciate your help.Attached Files
Comment
-
Hello neshnix89,
Thanks for your note.
The HACO indicator is programmed to function exactly as discussed in the December 2008 Stocks and Commodities article titled "Trading With The Heiken-Ashi Candlestick Oscillator" authored by Sylvain Vervoort.
In the Support department at NinjaTrader, it is against our policy to create, debug, or modify, code or logic for our clients. Further, we do not provide C# programming education services in our support. This is so that we can maintain a high level of service for all of our clients as well as our partners.
That said, you could modify the HACO indicator yourself to accomplish your goal. The HACO BackBrushAll property is set to use the PanelColorRising user-defined property (green by default) when the 'upw' bool is true. When the 'dnw' bool is false, the HACO BackBrushAll property is set to use the PanelColorFalling user-defined property (red by default).
You could consider adding a plot to the script using the AddPlot() method. You could check if the 'upw' bool is true in the script and assign the plot a value of 1. You could check if the 'dnw' bool is true and assign the plot a value of 0.
Then, you could reference that indicator plot in a Strategy Builder strategy to compare if the plot is 0 (BackBrushAll is red) or 1 (BackBrushAll is green).
AddPlot(): https://ninjatrader.com/support/help...t8/addplot.htm
This forum thread will also be open for other community members to share their insights or modify the code for you.
Let me know if I may assist further.Last edited by NinjaTrader_BrandonH; 11-01-2022, 10:46 AM.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
Hello everyone, I have a same request from above. I have a strategy I'm using but I need this indicator named CAM (File attached). I need someone to recreate this indicator to show a value when bar are green or red. Thank youAttached Files
Comment
-
Hello pickles1774,
Thanks for your note.
As stated in post # 19, in the Support department at NinjaTrader, it is against our policy to create, debug, or modify, code or logic for our clients.
That said, if you are interested modifying the script yourself, Draw.Text() or Draw.TextFixed() could be used to draw text on a chart, such as a value, when a certain condition occurs.
See the help guide documentation below.
Draw.Text(): https://ninjatrader.com/support/help.../draw_text.htm
Draw.TextFixed(): https://ninjatrader.com/support/help..._textfixed.htm
This forum thread will be open for other community members to modify the script for you if they wish to do so or share their insights.
Please let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
I am getting incompatability when I am trying to import this strategy, can neshnix89 or CS help ?Originally posted by neshnix89 View PostDear Kate,
I have somehow completed the strategy. However when I load it into the Ninjatrader, I cant get any results. I'm using 1 Min chart on Ninjatrader 8. Attached is the strategy file. Are you able to advise where the problem is?
Comment
-
-
Hello ramanareddy9,
I was able to download and import this on my end.
To confirm you are using the correct import process?
To import a NinjaScript into NinjaTrader 8 do the following:- Download the script to your desktop, keep it in the compressed .zip file.
- From the Control Center window select Tools -> Import -> NinjaScript Addon...
- Click the Desktop icon on the left to navigate to the desktop
- Select the downloaded .zip file -> then click Open
- NinjaTrader will then confirm if the import has been successful.
Below is a link to a support article on importing NinjaScripts.
https://support.ninjatrader.com/s/ar...Trader-Desktop
Are you getting an error message when attempting to import?
If so, may I have a screenshot of the error message?Chelsea B.NinjaTrader Customer Service
Comment
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
633 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
364 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
566 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
568 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment