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

I cannot get this line plot and show in databox

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

    I cannot get this line plot and show in databox

    the following is the codes trying to plot a horizontal line of yesterday VWAP on today's intraday chart. However, it just cannot get plot on the chart, any idea?

    if (Bars.FirstBarOfSession )
    {

    if (Time[0].DayOfWeek == DayOfWeek.Monday)
    timeOfInterest = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day - 3, 16, 30, 0);
    else
    timeOfInterest = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day - 1, 16, 30, 0);
    }
    barsAgo = GetBar(timeOfInterest) ;


    Plot0.Set(VWAP().VWAPLine[barsAgo]);

    #2
    Any errors in the log tab? Do you include a check for enough CurrentBars at the OnBarUpdate() start? Otherwise you run into issues reaching back at the start of your charts as there're no bars back then to calc for.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      The message from log tab is that:" Error calling the 'OnBarUpdat' method for indicator on bar 78 :year, month and day parameters describle an unrepresentable datetime" And I run another indicator "SampleGetBar" downloaded from this support forum and see the same message from logtab. What should I do?

      Comment


        #4
        You would need to print out associated values to debug where the issues stems from in your code at this time, I believe you would see this for example for an 'irregular' session day as last Monday (Memorial Day in the US) for example.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I have code that successfully draws horizontal lines to my indicator panel in "maximum" display mode (right click the verticle axis) but I do not see the lines in a data box. How do I get these horizontal lines to display in a data box?

          Comment


            #6
            That would unfortunately not be possible, only plots could be displayed in the data box.

            More control over the databox contents is on our feedback list for the next major NT version update, I've added your request in.

            Thanks,
            BertrandNinjaTrader Customer Service

            Comment


              #7
              More control of drawing objects is REALLY needed like:
              Show price marker checkbox (including left Y axis if there)
              Show in data box checkbox

              AND MOST ESPECIALLY;

              STOP having the properties box show with either a left click OR a right click. The properties box SHOULD ONLY SHOW with a right click!!! I have hundreds of times brought up the properties box by left clicking on a draw object to move it only to have the damn properties box show up for me to have to click cancel, and then try again which can cause the properties box to appear again, (like when I am in a trade with heat).

              This is NOT a problem with my mouse as I have replaced my mouse. Would you please update the request you put in with this info.




              Anyway Bertrand.... thank you for your reply

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by jxs_xrj, 01-12-2020, 09:49 AM
              6 responses
              3,290 views
              1 like
              Last Post jgualdronc  
              Started by Touch-Ups, Today, 10:36 AM
              0 responses
              8 views
              0 likes
              Last Post Touch-Ups  
              Started by geddyisodin, 04-25-2024, 05:20 AM
              8 responses
              61 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by Option Whisperer, Today, 09:55 AM
              0 responses
              8 views
              0 likes
              Last Post Option Whisperer  
              Started by halgo_boulder, 04-20-2024, 08:44 AM
              2 responses
              24 views
              0 likes
              Last Post halgo_boulder  
              Working...
              X