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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      98 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      143 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      69 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      125 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      77 views
      0 likes
      Last Post PaulMohn  
      Working...
      X