• 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

Using Graphics.DrawString to Print Volume at Price

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

  • NinjaTrader_ChelseaB
    replied
    Hello MercuryScripter,

    Thank you for your note.

    While using the graphics library is not supported by NinjaTrader, one tip would be to create an indicator to do this drawing instead of doing the drawing from the strategy.

    From the strategy, call the indicator and it will use the same information available to the strategy to do calculations and make drawings.

    Leave a comment:


  • MercuryScripter
    replied
    Thanks sledge. All of the reference I have found thus far refer to overwriting the Plot method inside an indicator. However, I am trying to accomplish the custom print inside of a strategy. Unfortunately, I have not been able to figure it out just yet :-(

    I'm still not sure how to plug in the X & Y values ... X would be a fixed location with a offset from the right margin and Y would be a price level.

    Leave a comment:


  • sledge
    replied
    Searching on drawstring I found this one:

    http://www.ninjatrader.com/support/f...ght=DrawString

    Leave a comment:


  • Using Graphics.DrawString to Print Volume at Price

    Hello,

    NT7's DrawText method does not offer the ability to draw text in a fixed location using an offset from the right margin.

    Studying the CustomPlotSample indicator I see that custom location prints on the chart may be performed via the Graphics.DrawString method.

    I am trying to do this directly from my strategy. I'm calculating volume at price but would like to print it via a Right margin offset.

    Would sincerely appreciate anyone's help me with this?

    This is what I've got so far, but not sure how to determine the X & Y values:
    I've defined the Graphics graphics object and the Fontname & VolAtPriceColor variables earlier in the code.

    Code:
    graphics.DrawString(CurrBidTradedVol.ToString(),Fontname,VolAtPriceColor,X, Y)

Latest Posts

Collapse

Topics Statistics Last Post
Started by qewcool, Today, 01:14 AM
0 responses
1 view
0 likes
Last Post qewcool
by qewcool
 
Started by fredrikn, 05-08-2019, 04:01 AM
17 responses
669 views
1 like
Last Post emtrader  
Started by zacharydw00, Yesterday, 10:19 PM
0 responses
3 views
0 likes
Last Post zacharydw00  
Started by chafan11, Yesterday, 09:28 PM
0 responses
7 views
0 likes
Last Post chafan11  
Started by GreenspanAlec, Yesterday, 05:32 PM
0 responses
7 views
0 likes
Last Post GreenspanAlec  
Working...
X