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

Draw Ray problem on both historical and real time data

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

    Draw Ray problem on both historical and real time data

    I have tried to alter the code CurrentDayOHL to draw ray for High and Low Price.

    But the ray only draw on recent day only, how can I applied it on the previous day also ?

    Would you help to show me an example and a result picture.
    Thank you.

    Regards,
    Franco

    #2
    Hello Franco,

    On a new trading day, change the name of the tagName of the drawing object and a new object will be drawn instead of the existing object replaced in a new location.

    Attached is a simple example that would draw a ray from the low of the day to the high of the day.
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      Thank you for your prompt reply on my question.
      Your example help me a lot on drawing object, and it also shows the analytical method can simpliful the coding.

      Regards,
      Franco

      Comment


        #4
        Hi Chelsea,

        I found that if the first bar is the highest bar of a trading day, it only draw on the second highest bar only.
        Would you help to reproduce my finding ?

        Thanks !

        Regards,
        Franco

        Comment


          #5
          Hello Franco,

          You may need to add 1 to the Bars.BarsSinceNewTradingDay as I think when this is called, it does not include the current bar.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pibrew, Today, 06:37 AM
          0 responses
          0 views
          0 likes
          Last Post pibrew
          by pibrew
           
          Started by rbeckmann05, Yesterday, 06:48 PM
          1 response
          12 views
          0 likes
          Last Post bltdavid  
          Started by llanqui, Today, 03:53 AM
          0 responses
          6 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          10 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          15 views
          0 likes
          Last Post AaronKoRn  
          Working...
          X