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!
See more
See less

Partner 728x90

Collapse

Background Color

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

    #16
    I did it, but it does not work :-(

    Comment


      #17
      maitreja,

      Let us take a step back. These are the exact steps you need to do to get your strategy onto a chart.

      1. Create your strategy and make sure it compiles alright
      2. Connect to your data provider
      3. Open a chart that has data on it
      4. Ctrl+S to bring up the Strategy selection window
      5. Select your strategy from the left hand side and then press the "New" button
      6. Change your strategy parameters on the right hand side.
      7. Press Apply
      8. Press OK
      9. Your strategy will be on your chart now. If your strategy has any errors it will appear in the Control Center logs.
      Josh P.NinjaTrader Customer Service

      Comment


        #18
        I did it. I tried to attach screenshot. Strategy is running, it is writing into console what I want, I'm connected......

        I dont know how to say it in English, but in czech looks like very zapeklitý problem :-)

        Comment


          #19
          second attempt, it was to big
          Attached Files

          Comment


            #20
            Great, it looks like you have it working now. If you have other questions feel free to post them on the forums. Have a good day!
            Josh P.NinjaTrader Customer Service

            Comment


              #21
              Hi Josh, I know, it looks fine, but background color is not changing.
              Can you try my code in your NT?

              Comment


                #22
                Test your code in BarsInProgress 0.
                Josh P.NinjaTrader Customer Service

                Comment


                  #23
                  It works fine

                  Comment


                    #24
                    You are charting the NQ but you are trying to change colors for the TICK. That will not work. Instead just program from within the BarsInProgress = 0 context. To access the close value of the tick you can use Closes[1][0].

                    Code:
                    if (BarsInProgress == 0)
                    {
                         if (Closes[1][0] > 0)
                              BackColorAll = Color.Red;
                    }
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      Now it works fine, thank you
                      maitreja

                      Comment


                        #26
                        So one more question - is it possible to do color will change in this case:
                        I'm using 5 min TF NQ and 1 min TF Tick. If Tick is under or above some value, background color will change immediatly via Tick during drawing 5TF bar? It means online changing for example 3 times on one bar?

                        Comment


                          #27
                          That is no different than what you already have. Just run on CalculateOnBarClose = false.
                          Josh P.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Davide999, 05-18-2023, 03:55 AM
                          4 responses
                          556 views
                          1 like
                          Last Post kcwasher  
                          Started by Stanfillirenfro, Today, 07:23 AM
                          2 responses
                          10 views
                          0 likes
                          Last Post Stanfillirenfro  
                          Started by rexsole, Today, 08:39 AM
                          2 responses
                          7 views
                          0 likes
                          Last Post NinjaTrader_Erick  
                          Started by cmtjoancolmenero, Yesterday, 03:58 PM
                          6 responses
                          29 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Started by gbourque, Today, 06:39 AM
                          2 responses
                          14 views
                          0 likes
                          Last Post gbourque  
                          Working...
                          X