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:	68
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

    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.

          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:	40
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.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              65 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              41 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              23 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              26 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              52 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X