Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing to Instrument PointValue for a DrawingTool

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

    Accessing to Instrument PointValue for a DrawingTool

    Hi,
    I'm trying to develop a position sizing tool based on the standard RiskReward drawing tool but the following code is not available for a DrawingTool :
    Bars.Instrument.MasterInstrument.PointValue .
    How can i access to the point value of the instrument for my Drawing tool ?
    I need this data to compute the number of shares/contracts.
    Thank you,
    Mickael

    #2
    Hi Mickael, thanks for writing in.

    Drawing tools have the GetAttachedToChartBars() method, e.g.

    Code:
    ChartBars myBars = GetAttachedToChartBars();
    
    Print(myBars.Bars.Instrument.MasterInstrument.PointValue.ToString());
    Kind regards,
    -ChrisL

    Comment


      #3
      Hi Chris,
      Thank you for your answer, it's working like a charm.
      Kind regards,
      MJ

      Click image for larger version

Name:	image_67790.png
Views:	189
Size:	58.8 KB
ID:	1162918

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      47 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X