Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Diferences in OCHL between chart and print

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

    Diferences in OCHL between chart and print

    Hi.
    I have print OCHL in a ZB-06-24 chart for 15 minutes candles

    The Print code below is included in a simple strategy. The values of the strategy analyzer and the chart are the same

    data = Time[1].ToString("MM/dd/yyyy;HH:mm:ss") + dataSeparator + Open[1] + dataSeparator + High[1] + dataSeparator + Low[1] + dataSeparator + Close[1] + dataSeparator + Volume[1]

    ************************************************** ************************************************** *

    There are significance differences between TXT and Chart

    TXT:
    04/30/2024;18:45:00,114.15625,114.15625,114,114.03125,32 72

    Chart


    Click image for larger version

Name:	image.png
Views:	33
Size:	15.7 KB
ID:	1301786


    Volume is the same but values of the candle are highly differentsn between the chart and print file

    Thanks

    #2
    Hello memonic,

    The difference here is caused because the instrument being used in the user interface adheres to the fractional notation for the prices where NinjaScript uses the actual decimal number. Currently there is no way to change the chart to use decimal numbers for instruments that use fractional notation, there is a feature request for this which I will add a vote for you. This request is being tracked under the number SFT-5354.

    You can find details on how to convert from fractional to decimal or decimal to fractional in the following forum post: https://forum.ninjatrader.com/forum/...37#post1062137
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse.

      In this case. in my strategy, its necesary to change the inputs to decimal numbers and the output to fractional numbers in bond instruments?.

      Best regards

      Comment


        #4
        I need to extract from strategy analyzer OCHL, make some calculations and generate the price of limit orders.

        Comment


          #5
          Hello memonic,

          In NinjaScript you will always have the full decimal number, the fractional notation is just a way to display the price for specific instruments in the user interface.

          JesseNinjaTrader Customer Service

          Comment


            #6
            Hello Jesse.
            In back testing of the strategy the orders are submitted in fractional?

            Click image for larger version

Name:	image.png
Views:	13
Size:	28.0 KB
ID:	1302135

            Comment


              #7
              Hello memonic,

              That is the user interface so the prices are shown in fractional notation, your script will still be able to see the full decimal values.
              JesseNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Epiphany79, Today, 05:00 PM
              0 responses
              4 views
              0 likes
              Last Post Epiphany79  
              Started by punkiy2111, 08-31-2021, 10:42 AM
              16 responses
              951 views
              0 likes
              Last Post muchacha  
              Started by gbourque, Yesterday, 04:11 PM
              5 responses
              20 views
              0 likes
              Last Post gbourque  
              Started by dtl-saw, 12-29-2022, 09:12 AM
              42 responses
              3,116 views
              1 like
              Last Post aligator  
              Started by AlphaOptions, 06-18-2013, 08:24 AM
              4 responses
              2,162 views
              0 likes
              Last Post ybforex
              by ybforex
               
              Working...
              X