Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy builder to enter using indicator color

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Dear Kate,

    Attached the error.

    Attached Files

    Comment


      #17
      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


        #18
        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


          #19
          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


            #20
            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 you
            Attached Files

            Comment


              #21
              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


                #22
                Originally posted by neshnix89 View Post
                Dear 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?
                I am getting incompatability when I am trying to import this strategy, can neshnix89 or CS help ?

                Comment


                  #23
                  Hello ramanareddy9,

                  Welcome to the NinjaTrader forums!

                  What strategy are you trying to import?

                  Are you referring to the ShortTermSwingsTrendExposed indicator attached to post # 2?
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #24
                    yes, the ShortTermSwingsTrendExposed indicator attached to post # 2?​

                    Comment


                      #25
                      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:
                      1. Download the script to your desktop, keep it in the compressed .zip file.
                      2. From the Control Center window select Tools -> Import -> NinjaScript Addon...
                      3. Click the Desktop icon on the left to navigate to the desktop
                      4. Select the downloaded .zip file -> then click Open
                      5. NinjaTrader will then confirm if the import has been successful.
                      Critical *Note that on any files that say "File already exists on your PC" that start with an "@" symbol are the ones that came preloaded inside of NinjaTrader so you would say "No" so that you do not override those files.

                      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


                        #26
                        After import, Strategy is not working, not sure if you can help or neshnix89

                        Comment


                          #27
                          Hello ramanareddy9,

                          I've tested the indicator and found this is setting plot values.

                          As mentioned in post # 23 this is an indicator (and not a strategy).

                          Below is a link to a video of the test.
                          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
                          629 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          362 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          105 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          564 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          568 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X