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

Help

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

    Help

    How to plot values of an indicator to its normal ticksize? For example I want to plot the high value of EURUSD but my indicator will only plot up to 3 decimal places. How to plot the normal high value?

    #2
    Hello luxurious_04,

    Thanks for your note.

    To plot the high of your primary dataseries set the plot value to the value of the high dataseries with 0 bars ago.

    For example:

    in the Initialize() section:
    Add(new Plot(Color.Blue, PlotStyle.Line, "myPlot"));

    in the OnBarUpdate section:
    Value.Set(High[0]);

    This would create a line plot that connects the highs of the primary instrument.

    Also, for example:
    Value.Set(High[0] + 2 * TickSize);

    This would create a line plot that connects the high plus 2 ticks of the primary instrument.

    Below is a link to the help guide on the Value dataseries object.
    http://www.ninjatrader.com/support/h.../nt7/value.htm

    And also, here is a link to the help guide on TickSize.
    http://www.ninjatrader.com/support/h...7/ticksize.htm


    Please do not hesitate to contact us for any other NinjaTrader inquiries you may have.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I tried that one but when the values plotted on the right side are being round to 2 decimal places. In the chart the high is 1.3093 and in my indicator the plotted dot values is 1.31 and I don't want that. I have used Values[0].Set(High[0]).

      Comment


        #4
        Hello luxurious_04,

        To do my testing I am using the $EURUSD instrument.

        With this instrument I have done prints to the output window showing that the High[0] is showing up to the 4th decimal place. (current high is 1.3014).

        I then use Value.Set(High[0]) to set the plot to the high. The plot is currently showing at 1.3014.

        This means that the High can contain more than 2 decimal places and the Plot is able to display it properly.

        This instrument is showing the 10 thousands decimal place on the chart correct?

        If you print the value of High[0] to the output window, does the print show the 10 thousands decimal place?


        I look forward to your reply.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Yes it prints 10 thousands decimal. I also printed out the plot value like this Print("Current High: +Value[0]"); and in the output window it prints thousands decimal but the indicator line that has the value is only 2 decimal places instead of 1.3096 it prints 1.31.

          Comment


            #6
            Hello luxurious_04,

            Thanks for the reply.

            May I have a screenshot of your chart along with the price printed in the output window from the same time?

            To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and add the file as an attachment.

            For detailed instructions please visit the following link
            http://take-a-screenshot.org/


            I look forward to your response.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by drewski1980, Today, 08:24 AM
            0 responses
            3 views
            0 likes
            Last Post drewski1980  
            Started by rdtdale, Yesterday, 01:02 PM
            2 responses
            16 views
            0 likes
            Last Post rdtdale
            by rdtdale
             
            Started by TradeSaber, Today, 07:18 AM
            0 responses
            7 views
            0 likes
            Last Post TradeSaber  
            Started by PaulMohn, Today, 05:00 AM
            0 responses
            10 views
            0 likes
            Last Post PaulMohn  
            Started by ZenCortexAuCost, Today, 04:24 AM
            0 responses
            6 views
            0 likes
            Last Post ZenCortexAuCost  
            Working...
            X