Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Chris L.NinjaTrader Customer Service

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

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by frankthearm, Today, 09:08 AM
      3 responses
      6 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by yertle, Today, 08:38 AM
      5 responses
      14 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by adeelshahzad, Today, 03:54 AM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by bill2023, Yesterday, 08:51 AM
      6 responses
      27 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
      80 responses
      19,667 views
      5 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X