• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Bars Data in DrawingTools

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

    Get Bars Data in DrawingTools

    I created my own Rectangle Drawing Tool. Now I want to have the Rectangle snap to the highest High and Lowest Low of the bars selected in the Rectangle. Should be easy using StartAnchor.SlotIndex and EndAnchor.SlotIndex to create a loop. The set StartAnchor/EndAnchor.Price. To do that I need access to the High[index] and Low[index]. Is there a Using declaration I can add? Or something else? I am open to suggestions.

    This does not work:
    bars.Bars.GetHigh[index}
    Bars.GetHigh[index]

    Thanks.

    #2
    Hello TAJTrades,

    What bar object are you using?

    Are you using GetAttachedToChartBars().Bars to get the bars object?
    http://ninjatrader.com/support/helpG...ochartbars.htm

    Do you have a test script with only the code necessary to demonstrate that the bars.GetHigh() does not work correctly?

    If so, may I have an export of the reduced test script to test on my end?

    To export a NinjaTrader 8 NinjaScript do the following:
    1. Click Tools -> Export -> NinjaScript...
    2. Click the 'add' link -> check the box(es) for the script(s) you want to include
    3. Click the 'Export' button
    4. Enter a unique name for the file in the value for 'File name:'
    5. Choose a save location -> click Save
    6. Click OK to clear the export location message

    By default your exported file will be in the following location:
    • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>


    Below is a link to the help guide on Exporting NinjaScripts.
    http://ninjatrader.com/support/helpG...-us/export.htm


    (As a tip, this is being used successfully in the RegressionChannel drawing tool)
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks.

      (As a tip, this is being used successfully in the RegressionChannel drawing tool) is all I needed. Will use that as an example. I was trying something different.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sohailashraf, Yesterday, 10:18 PM
      0 responses
      4 views
      0 likes
      Last Post sohailashraf  
      Started by jjnc2006, Yesterday, 07:36 PM
      0 responses
      9 views
      0 likes
      Last Post jjnc2006  
      Started by futurenick, Yesterday, 06:26 AM
      1 response
      12 views
      0 likes
      Last Post nkhoi
      by nkhoi
       
      Started by NinjaCustomer, Yesterday, 12:29 PM
      2 responses
      10 views
      0 likes
      Last Post NinjaCustomer  
      Started by Steve L, Yesterday, 11:32 AM
      0 responses
      8 views
      0 likes
      Last Post Steve L
      by Steve L
       
      Working...
      X