Attached the error.
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
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.Kate W.NinjaTrader Customer Service
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.Brandon H.NinjaTrader Customer Service
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.Brandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by KonstantinosNT, Yesterday, 10:31 PM
|
1 response
12 views
0 likes
|
Last Post
|
||
Started by torento, Today, 07:03 AM
|
1 response
10 views
0 likes
|
Last Post
|
||
Started by MicroTrends, 03-14-2023, 07:32 AM
|
7 responses
160 views
0 likes
|
Last Post
|
||
Started by alanlopen, Today, 04:48 AM
|
4 responses
14 views
0 likes
|
Last Post
![]()
by alanlopen
Today, 07:25 AM
|
||
Started by yngtrader, Yesterday, 07:43 PM
|
1 response
6 views
0 likes
|
Last Post
|
Comment