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

projecting indicator value to the future

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

    projecting indicator value to the future

    I have an indicator which would project value of SMA to the future. I can't figure out how to plot the projected value to the future bars that have not been printed yet.

    Is there a way to do this on Ninja?

    #2
    Hello,

    Depending how the values you were plotting you can change the displacement to have the values shifted to the right



    If you're looking to draw to the right of the chart you can draw to a negative index location, but unfortunately cannot plot to the right
    LanceNinjaTrader Customer Service

    Comment


      #3
      I can use DrawDot but it is too large. Is there a way to control the size of the Dot?

      Comment


        #4
        Hello,

        You won't be able to change the size of the dot but I've seen some people use a font such as Wingdings to draw different chart symbols and then change the size by adjusting the font size



        For other custom drawn objects:
        There are virtually no limits for custom drawing on a chart panel. Since NinjaScript is based on Microsoft C#, the entire System.Drawing namespace is available for use. Custom drawing is an advanced programming topic and should only be considered by programmers familiar with Microsoft C# and the .NET Framework.

        Please see the following indicators for reference samples of custom drawing by overriding the Plot() method of the Indicator base class:

        • CustomPlotSample
        • TickCounter
        • VolumeZones
        LanceNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Lance View Post
          Hello,

          Depending how the values you were plotting you can change the displacement to have the values shifted to the right



          If you're looking to draw to the right of the chart you can draw to a negative index location, but unfortunately cannot plot to the right
          Having the same issue/question. I need to plot 3 ma's, each one displaced to the right by a different amount. In theory if they were all displaced the same amount, I could get by with using the displacement param.

          I understand that I can't use a plot for that - right? I can't do Values[0][-5]?

          Onn

          Comment


            #6
            Correct, in order to draw further to the right would be through the use of Drawing objects or having them all displaced by the same amount.
            LanceNinjaTrader Customer Service

            Comment


              #7
              My issue was I needed to shift the indicator values 10 bars left and then draw the last 10 bars using a different set of calculations:

              I came up with a solution - I am now shifting the plot by 10 bars as follows:

              Plot1.Set(10,Value[0]);

              I had to make sure I don't plot on the last 10 bars of the chart:

              if(CurrentBar<Bars.Count - 11)
              {
              ..... draw the shifted values
              }
              else
              {
              draw the last 10 bars only
              }

              This solution works perfectly. I set the Displacement = 0


              Afshin
              Last edited by afshinmoshrefi; 05-16-2013, 02:46 PM. Reason: more detail

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by arvidvanstaey, Today, 02:19 PM
              4 responses
              11 views
              0 likes
              Last Post arvidvanstaey  
              Started by samish18, 04-17-2024, 08:57 AM
              16 responses
              59 views
              0 likes
              Last Post samish18  
              Started by jordanq2, Today, 03:10 PM
              2 responses
              9 views
              0 likes
              Last Post jordanq2  
              Started by traderqz, Today, 12:06 AM
              10 responses
              18 views
              0 likes
              Last Post traderqz  
              Started by algospoke, 04-17-2024, 06:40 PM
              5 responses
              47 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X