• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 charts all over the place

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

    NT7 charts all over the place

    Hello friends, My name is Juan, and I am writing to see if you can help me with a little problem that I have, I am making an indicator and I have a small problem, and I want to see if you can help me solve it, it happens that the Indicator I put a rectangle But when I throw the rectangle No forward does not run does not move forward Stationary, and so that it can move I have to refresh the chart, see if you can help me solve that problem please Thank you beforehand.

    And here below he left what I did.
    --------------------------------------------------------------------------------------------------------------------
    protected override void OnBarUpdate()
    {
    if (CurrentBar == 0) return;

    if(Open[0] == Close[0])
    {
    if (showshadow) base.DrawRectangle("Rect"+ CurrentBars[0],false,Times[0][15],High[0]+(HighestBar(High,1)),Times[0]
    [-shadowlength],Low[0]-(LowestBar(Low,-1)),tr,shadowcolor,opacity);

    }

    }

    #2
    Hello adonm5,

    Anytime DrawRectangle() is called with the same tag name, this will re-draw the object using the new parameters. This means the existing object will be updated and moved.

    Anytime a unique tag name is used, a new drawing object will be made.

    With "Rect"+ CurrentBars[0] as the tag name, I would expect a new object to be made each time the Open[0] is equal to the Close[0] and showshadow is true.

    If you want a single object, remove the +CurrentBars[0] from the tag name so the tag name is no longer unique. This will cause the existing object to be updated and moved instead of a new object drawn.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi guys, I hope you are well. I am trying to communicate with you to see if you can help me with a problem with an indicator that is treated as it should be but I have not been able to complete it, it happens that when I put the object it does not move forward, and I am not really programmer I do not have much experience is just what I want to do, to see if you can help me how to modify the rectangle that runs to the right every time a candle saw every time the price moves forward the bar moves forward I also want to move the indicator along with it to see if you can help me with that please, if you can give an example of how I can do it and remember that I am not a programmer, it is a very simple indicator but I can not fix it that is everything if you can help me please thank you very much.

      And the indicator is left below so they can tell me what I should do.

      #region Variables
      // Wizard generated variables
      int opacity = 6;
      bool showshadow = true;
      int shadowlength = 105;
      Color shadowcolor = Color.Gold;
      private Color transp = Color.Transparent;
      // User defined variables (add any user defined variables below)
      #endregion

      /// <summary>
      /// This method is used to configure the strategy and is called once before any strategy method is called.
      /// </summary>
      protected override void Initialize()
      {
      CalculateOnBarClose = true;
      Overlay = true;
      }

      protected override void OnBarUpdate()
      {
      // Condition set 1
      if (Open[0] == Close[0])
      {
      // DrawRectangle("tag1", showshadow,-shadowlength, Low[0] - TickSize, 5, High[0] + TickSize, transp, shadowcolor, opacity);

      // DrawRectangle("Rect" + CurrentBar ,showshadow,Times[0][15],High[0],Times[0][-shadowlength],Low[0],transp,shadowcolor,opacity);
      }
      }

      Comment


        #4
        Hello adonm5,

        Thank you for writing in.

        I would suggest checking out the following example which contains the logic for drawing rectangles ahead from the point they are found,
        https://ninjatraderecosystem.com/user-app-share-download/colored-zones/
        https://ninjatraderecosystem.com/user-app-share-download/colorzone3/



        You may also find this sample helpful,
        https://ninjatraderecosystem.com/user-app-share-download/insidebar/
        https://ninjatraderecosystem.com/user-app-share-download/dynamicsrlines/


        If you are still unable to get the indicator working as desired and would like a list of third parties that would be interested in building this for you please let us know.

        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sohailashraf, Yesterday, 10:18 PM
        0 responses
        4 views
        0 likes
        Last Post sohailashraf  
        Started by jjnc2006, Yesterday, 07:36 PM
        0 responses
        9 views
        0 likes
        Last Post jjnc2006  
        Started by futurenick, Yesterday, 06:26 AM
        1 response
        12 views
        0 likes
        Last Post nkhoi
        by nkhoi
         
        Started by NinjaCustomer, Yesterday, 12:29 PM
        2 responses
        10 views
        0 likes
        Last Post NinjaCustomer  
        Started by Steve L, Yesterday, 11:32 AM
        0 responses
        8 views
        0 likes
        Last Post Steve L
        by Steve L
         
        Working...
        X