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

BarsInProgress and plot method

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

    BarsInProgress and plot method

    Hi All

    I have a problem concerning BarsInProgress and Plot method behavior. I know Plot method is not supported but I don't think that we need to understand the Plot method in details to solve this problem.

    I have two data period 1 tick and 30 minutes..

    The problem is that I am referring to the CurrentBar on the Plot method to draw stuff based only on the 30 minutes period.

    If I write :

    If (BarsIn Progress==0)

    in the Plot method when I have a BarsInProgess==1 update all the drawing disappear..

    How can I refer CurrentBar only to BarsInProgress==0...

    I tried CurrentBar[0][0]...

    Did not work


    Thanks

    #2
    Hi blar58,

    If you're wondering about CurrentBar as it applies to multi series:

    CurrentBar is primary series index for bars.
    CurrentBars can apply to multiple series.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      So If want to refer to the 30 Minutes Bar (which is the primary series ) CurrentBar on the Plot method what should I write ?

      Thank

      Comment


        #4
        OK I think I got it : CurrentBars[0] right ?

        Comment


          #5
          Yes that works. You can also access only within BIP == 0

          if (BarsInProgress == 0)
          //CurrentBar only applies to primary series.
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            OK Thanks RyanM

            I would like to know if there is a way to tell the indicator not to update Plot method when BarsInProgress==1.

            If I enclosed my Plot method between
            if(BarsInProgress==0)
            {
            // DO something
            } // End Of Plot Method

            when BarsInProgress==1 every object that has to be drawn is erased until BarsInProgress==0;

            I would like to ignore Plot method when BarsInProgress==1....


            Thanks

            Comment


              #7
              Hi Blar,

              Unfortunately if your code overrides plot method we are not able to support it. Please let us know what you're trying to do and we can help identify if it's possible with supported techniques.
              Ryan M.NinjaTrader Customer Service

              Comment


                #8
                Yes I am overring the Plot method but what I am trying to do is to ignore the method when BarsInProgress==1. I want to plot things only related to BarsInProgress 0.

                Comment


                  #9
                  We cannot assist with overriding the plot method. If you have something you would like for us try on our side, we can take a look but can only help you with supported techniques.

                  You can also share what you have so far and hopefully receive response from one of our community members.
                  Ryan M.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by cre8able, Yesterday, 01:16 PM
                  3 responses
                  11 views
                  0 likes
                  Last Post cre8able  
                  Started by ChartTourist, Today, 08:22 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post ChartTourist  
                  Started by LiamTwine, Today, 08:10 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post LiamTwine  
                  Started by Balage0922, Today, 07:38 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post Balage0922  
                  Started by JoMoon2024, Today, 06:56 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post JoMoon2024  
                  Working...
                  X