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 llanqui, Today, 03:53 AM
    0 responses
    5 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    14 views
    0 likes
    Last Post strategist007  
    Working...
    X