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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    74 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    26 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    62 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X