Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dataseries - plottings bar

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

    Dataseries - plottings bar

    Hello,

    because there is no marketprofile in NinjaTrader I had to make me an "indicator" with plotting the TPO letters and I want to plot me on the high and low numbers from calculations derived from marketprofile theory.

    All works fine but I have one problem: In the indicator I have to use 2 dataseries, the 30 minute and a "inside" smaller lets say 2 Range as BarsInProgress==1 in the code.

    When I have in the code the following logic (to explain my question accurately):

    if(BarsInProgress==1)
    {do my calculations and then Draw.Text(this, "diffHigh", true, str1, 0, Highs[0][0] + 13*TickSize, 0, Brushes. Black,new SimpleFont ("Arial",9), TextAlignment.Center, Brushes.Transparent,null,1);}

    how can I have plotted the str1 on the High of BIP=0 and not on the High of BIP=1 please? (because the calculation runs in BIP=1 bracket and the barsago in the syntax of Draw.Text refers to BIP=1 from my understanding.)

    Thank you!
    Tony







    #2
    Hello tonynt,

    You are already doing that by using Highs[0][0] as the price. If you want the BarsAgo to refer to primary bars ago you would want to move that to BIP 0. If you moved the code to BIP 0 you would need to make a string variable and then set your string from BIP1 and draw from BIP 0.

    I look forward to being of further assistance.

    Comment


      #3
      Hello,

      thank you for your reply. Maybe I have translated incorrect or asked not accurately...

      yes I do with Highs[0][0] but the question is if in the syntax "....str1, 0, Highs[0][0] +..." the 0 here is barsago from the Highs[0][0] used in this Draw.Text line or if the 0 here is referring to the BIP bracket where its calculated as I have

      if (BIP==1) // 1= Range,2
      {
      calculate...;
      Draw.Text("....str1, 0, Highs[0][0] +...."
      }

      if(BIP==0)
      {then do other stuff}

      Thank you!
      Tony

      Comment


        #4
        Hello tonynt,

        The 0 BarsAgo would be from where the object is drawn, can you clarify what you are trying to do?

        Please let me know if I may be of further assistance.

        Comment


          #5
          Hello,

          thank you for your reply. From this I understand that the 0 barsago is the same dataseries as the Highs[0][0] in that string. Then I have all I need because I want to plot the double (that is calculated in the bracket of BIP=1 with Range2 as shown in the minimalized code above) but is plotted above the high/below the low of the 30 min bar with is the BIP=0 and the Highs[0][0] in that string. So this will then work as we need.

          Thank you!
          Tony

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X