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 Balage0922, Today, 07:38 AM
    0 responses
    5 views
    0 likes
    Last Post Balage0922  
    Started by JoMoon2024, Today, 06:56 AM
    0 responses
    6 views
    0 likes
    Last Post JoMoon2024  
    Started by Haiasi, 04-25-2024, 06:53 PM
    2 responses
    19 views
    0 likes
    Last Post Massinisa  
    Started by Creamers, Today, 05:32 AM
    0 responses
    6 views
    0 likes
    Last Post Creamers  
    Started by Segwin, 05-07-2018, 02:15 PM
    12 responses
    1,786 views
    0 likes
    Last Post Leafcutter  
    Working...
    X