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

New User Woes

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

    So close is the last trade and not the close of the bar??, i was trying to reference the last trade during a bar. like not the final last but like the last one a second agon during the current bar

    Comment


      If you are running CalculateOnBarClose = false (tick by tick) then Close[0] is the last trade. If you are running with it true, close of the bar, then this is the last trade since you can not access it intrabar since OnBarUpdate() is only called on the close of the bar.
      RayNinjaTrader Customer Service

      Comment


        How do you keep the arrows drawn on the charts to stay on the chart, mine draw like on the current bar then dissapear

        Comment


          Don't pass in the same tag value, make them unique such as

          string myTag = "downArrow" + CurrentBar;
          RayNinjaTrader Customer Service

          Comment


            k i will try that, so basically if i use a tag, for when the price moves up more than 2 dollars at the end of the day it would show an arrow everytime that occured right??

            Comment


              A unique tag will ensure that whenever you call any drawing method, you will get a unique instance of a drawn object.
              RayNinjaTrader Customer Service

              Comment


                Thanks for the help guys, I do have another quesdtion i have been trying to get figured out,

                I know there is the indicator with the open high and low of the session, but the problem i have is if i set the sessin to begin at 8:30am the cahrts are messed up becuse i dont have the data before 8:30 am. so i usually will have the session begin at 12:00 am to 12:00am. What i would like is the same indiactor but to draw the lines from the open at 8:30am instead of 12:00am. I havent been able to figure out how to make it draw the lines at 8:30 am instead of session beginning

                Comment


                  You would have to figure out the bar index of the 1st bar after 8:30 AM and use this to calculate number of bars ago and use this as the start point of your line.
                  RayNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by algospoke, 04-17-2024, 06:40 PM
                  6 responses
                  48 views
                  0 likes
                  Last Post algospoke  
                  Started by arvidvanstaey, Today, 02:19 PM
                  4 responses
                  11 views
                  0 likes
                  Last Post arvidvanstaey  
                  Started by samish18, 04-17-2024, 08:57 AM
                  16 responses
                  61 views
                  0 likes
                  Last Post samish18  
                  Started by jordanq2, Today, 03:10 PM
                  2 responses
                  9 views
                  0 likes
                  Last Post jordanq2  
                  Started by traderqz, Today, 12:06 AM
                  10 responses
                  19 views
                  0 likes
                  Last Post traderqz  
                  Working...
                  X