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

how to set the Plot of an indicator from a strategy

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

    how to set the Plot of an indicator from a strategy

    I am having this issue with my strategy:

    I have a strategy, which tries to change the value of an indicator plot, so that I can plot the calculated value in the ChartPanel.... This indicator's only function, is to plot this number, which the strategy passes on to it.
    Is there an example of How to achieve this ?

    #2
    Originally posted by Yandychang View Post
    I am having this issue with my strategy:

    I have a strategy, which tries to change the value of an indicator plot, so that I can plot the calculated value in the ChartPanel.... This indicator's only function, is to plot this number, which the strategy passes on to it.
    Is there an example of How to achieve this ?
    Why don't you make your life easier - and code your indicator to plot the value and have your strategy act on it?

    What is your reason for going against this?

    Comment


      #3
      Hello Yandychang,

      Thanks for your post.

      Plotting from within a strategy can be done with some limitation as noted here: http://ninjatrader.com/support/forum...ead.php?t=6651
      Paul H.NinjaTrader Customer Service

      Comment


        #4
        Regarding plots

        Thank you for your responses, to Sledge, that's what I am trying to do... To ninjatrader Paul, Is there a sample of this for for NT 8?, I Know how to do this for NT 7, but I usually get mixed up with setting the values of Plot, and setting my indicator values in NT 8.

        Thank you

        Comment


          #5
          Hello Yandychang,

          Thanks for your reply.

          Please note that we are asking that all Ninjatrader 8 related posts be placed in the Ninjatrader 8 beta forums. We are doing this so we can better track all the issues and so that when we reply we know which platform we are responding too. I assumed this was Ninjatrader 7 and likely member sledge did as well.

          To answer your question though, I've converted the NT7 reference StategyPlot to NT8 that will plot the High and Low of a data series from a strategy to two separate panels using an indicator. (see picture) Both strategy and indicator are contained in the zip file, If you have further questions, please do start a new thread in the NT8 forums. Thanks for your understanding.

          Edit: Clarified conversion to NT8.
          Attached Files
          Last edited by NinjaTrader_PaulH; 04-01-2016, 02:06 PM.
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Thank you very much, it was very helpful, I got it to work

            Comment


              #7
              I tried to combine the strategy code and the indicator code in one file, but the compiler doesn't recognize the indy in that case. I guess, it should be precompiled and included in the reference. Thanks a lot anyway!

              Comment


                #8
                Hello quicktrick,

                Thanks for your post.

                Even though this thread is in the NT7 area the thread is about NT8.

                If you need help it may be better to create a new thread in either NT7 or NT8 forums to ensure that we can provide the correct assistance. You can always provide a link to this thread if you need to reference it.

                Thanks for understanding.
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  That's right, Paul. I wrote about NT8 too.

                  BTW, is there any way to combine all the code in one file? I've just added my question to another thread in the NT8 area, discussing the same problem.
                  Last edited by quicktrick; 04-05-2017, 08:33 PM.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Javierw.ok  
                  Started by timmbbo, Today, 08:59 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post bltdavid  
                  Started by alifarahani, Today, 09:40 AM
                  6 responses
                  41 views
                  0 likes
                  Last Post alifarahani  
                  Started by Waxavi, Today, 02:10 AM
                  1 response
                  20 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Working...
                  X