Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText and COBC = False

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

    #16
    Hi aventeren,

    There is code in this script that can change the behavior that was not previously posted.

    You are adding a secondary data series to your script. This means that the code will process once for each series. I would expect there to be more than the expected text boxes on each hour.

    If you are wanting to only plot on one time frame, then you will need to prevent the code from executing on the secondary time frame.

    For example:
    if (BarsInProgress == 1)
    return;
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      Thanks, Chelsea.

      I want the labels to be drawn for the secondary time series.

      For instance, let's assume that I have a 15 min chart open (primary chart) and the secondary chart is 60 min. The plots are for the secondary series (i.e., 60 min). I want the labels to plot the 15 min price relationship to the 60 min plot values (i.e., valueSMA, valueStdDev, valueBB2upper, etc).

      Is this possible?

      Thanks,

      Aventeren

      Comment


        #18
        Hello aventeren,

        Sure, you can run this only for the secondary series with:

        if (BarsInProgress == 0)
        return;
        Chelsea B.NinjaTrader Customer Service

        Comment


          #19
          Originally posted by NinjaTrader_ChelseaB View Post
          Hello aventeren,

          Sure, you can run this only for the secondary series with:

          if (BarsInProgress == 0)
          return;
          So where do I place this line of code?

          Comment


            #20
            Hi aventeren,

            Place this code before any code you do not want executed on the primary data series.

            If you want all the code to be run on the secondary data series then place this as the first line in OnBarUpdate.

            This is similar to the if (CurrentBar < BarsRequired) return; check you have. If there aren't enough bars do not execute the code. Similarly if this is not the primary data series do not execute the code.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Segwin, 05-07-2018, 02:15 PM
            14 responses
            1,788 views
            0 likes
            Last Post aligator  
            Started by Jimmyk, 01-26-2018, 05:19 AM
            6 responses
            837 views
            0 likes
            Last Post emuns
            by emuns
             
            Started by jxs_xrj, 01-12-2020, 09:49 AM
            6 responses
            3,293 views
            1 like
            Last Post jgualdronc  
            Started by Touch-Ups, Today, 10:36 AM
            0 responses
            13 views
            0 likes
            Last Post Touch-Ups  
            Started by geddyisodin, 04-25-2024, 05:20 AM
            11 responses
            63 views
            0 likes
            Last Post halgo_boulder  
            Working...
            X