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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      368 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      571 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X