Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

plot/draw ticks in profit

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

    plot/draw ticks in profit

    Hello,

    I would like to add to onposition

    DrawTextFixed("Pos", "\r\n"+ "" + Position.MarketPosition.ToString() + " " + Position.Quantity.ToString(), TextPosition.TopLeft,Color.Green, new Font ("Arial",15), Color.White,Color.White,5);

    showing the ticks in profit/or loss. Couldnt find in the helpguide how to do this.

    DrawTextFixed( ?????..........)

    Thank you
    Tony

    #2
    Hello,

    Thank you for the question.

    This may require some logic to do, there is not a pre calculated ticks of profit or loss tied to the Position object.

    You could potentially take the AvgPrice from the Position and compare that to the Current price and then convert that to a tick size.

    That would look like the following:

    Code:
    Instrument.MasterInstrument.Round2TickSize(Close[0] - Position.AvgPrice)
    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by geotrades1, Today, 10:02 AM
    1 response
    4 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by ender_wiggum, Today, 09:50 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by rajendrasubedi2023, Today, 09:50 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by bmartz, Today, 09:30 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by geddyisodin, Today, 05:20 AM
    3 responses
    26 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X