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:	197
Size:	58.8 KB
ID:	1162918

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      328 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      210 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      196 views
      1 like
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      285 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      241 views
      0 likes
      Last Post CarlTrading  
      Working...
      X