Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Text on candle at each price level

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

    Text on candle at each price level

    Guys I have tried many times draw text at each price level and update that text with volume at that price. But all my attempts failed. Any could help on this matter.


    Regards
    Salman

    #2
    Hello,

    Thank you for your note. Can you describe what you are doing and what is the unexpected behavior?

    Screen shots will help:
    To post a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and post the file as an attachment.
    DenNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Ben View Post
      Hello,

      Thank you for your note. Can you describe what you are doing and what is the unexpected behavior?

      Screen shots will help:
      To post a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and post the file as an attachment.
      Thanks Ben for your response. The idea is so simple, I need to draw the effect of traded volume Bid & Ask at each tick at the current price. Therefore, I can view TimeAndSales but more effectively on candles and see the effect of volume on chart. This will help me identify the short-term strong support and resistance and more importantly areas where upthrust in price is highly expected.


      See attached the screen shot and visual representation of the idea.

      Here's the code I used to plot the text:

      publicoverridevoid Plot(Graphics graphics, Rectangle bounds, double min, double max)
      {
      // Draw text.

      Font trFont =
      new Font("Times New Roman", 12);
      int y = trFont.Height + 20;
      Rectangle rect =
      new Rectangle(0, y, (int)bidPrice, trFont.Height);
      graphics.DrawRectangle(Pens.Blue, rect);
      string testString = "This is just a test";

      graphics.DrawString(testString, trFont, Brushes.Blue, rect);


      }

      So I need to draw a rectangle that's exactly equals the candles' size and the string should contained within the candles. Volume data should be updated in each textbox.


      Thanks
      Attached Files
      Last edited by Salmanyom; 12-19-2009, 03:41 PM.

      Comment


        #4
        Hello,

        So close up picture of the candles is what you want? I suggest using DrawText and use the yPixelOffset setting. You can read about it here:
        DenNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Ben View Post
          Hello,

          So close up picture of the candles is what you want? I suggest using DrawText and use the yPixelOffset setting. You can read about it here:
          http://www.ninjatrader-support.com/H.../DrawText.html

          Dear Ben,

          What's the appropriate integer value I should use for yPixelOffset, simply because I tried to put the TickSize but the chart is the same with tiny and compressed candles see attached
          Attached Files

          Comment


            #6
            Hello,

            Here try the following. Pixels offset is set at 100 there. Pixels are very small so you will have to use larger values to see movement:

            DrawText("new",true,"mytesting",0,High[0],100,Color.Black,new Font("Arial",15,FontStyle.Bold),StringAlignment.Center,Color.Aqua ,Color.Blue,1);
            DenNinjaTrader Customer Service

            Comment


              #7
              Thanks Ben,

              now the text issue is solved as shown in the attached picture. But the problem here is that the textbox's content is overwritten with volume per incoming tick. I need to store the vol per each price so that new volume data will add up to the previous volume.


              Regards,
              Attached Files
              Last edited by Salmanyom; 12-20-2009, 03:23 PM. Reason: Forget to upload the picture

              Comment


                #8
                Hello,

                I'm not sure what you want exactly but it sounds like you want volume per price per bar and the sum of all of the volume on each bar to equal the volume per bar. This is just tracking the vlaues and adding the new incoming volume to the existing volume and drawing that each time it changes. Something like:
                totalvol_at_priceX = totalvol_at_priceX + newvol_at priceX

                Where newvol_at_priceX is the incoming single tick volume. You will have to do that for each price and then draw it. Hope that helps. Give it a try and post questions.
                DenNinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by Salmanyom View Post
                  Thanks Ben,

                  now the text issue is solved as shown in the attached picture. But the problem here is that the textbox's content is overwritten with volume per incoming tick. I need to store the vol per each price so that new volume data will add up to the previous volume.


                  Regards,
                  Salmanyon,

                  Did you get this "TimeandSales" indy working ? If Yes, can you share it ?

                  Lolu

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Waxavi, Today, 02:00 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post Waxavi
                  by Waxavi
                   
                  Started by elirion, Today, 01:36 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post elirion
                  by elirion
                   
                  Started by gentlebenthebear, Today, 01:30 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post gentlebenthebear  
                  Started by samish18, Yesterday, 08:31 AM
                  2 responses
                  9 views
                  0 likes
                  Last Post elirion
                  by elirion
                   
                  Started by Mestor, 03-10-2023, 01:50 AM
                  16 responses
                  391 views
                  0 likes
                  Last Post z.franck  
                  Working...
                  X