Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Calculating the amount of loss

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

    Calculating the amount of loss

    Hi!

    I'm wondering how the NT8 calculates the amount of loss.
    Click image for larger version

Name:	image.png
Views:	111
Size:	7.5 KB
ID:	1336737
    I entered long at 105.15 and my stop loss was triggered at 90.22. The order quantity is 1
    Click image for larger version

Name:	image.png
Views:	110
Size:	6.8 KB
ID:	1336738​The amount of loss is $14,960
    1. How is this value calculated?
    2. How do I set a protective stop at $5000 loss per trade in the OnExecutionUpdate?


    Thank you!

    #2
    Hello muaythai,

    The values calculated would be based on the executions and the prices at the time of the orders.

    To set up stoploss orders at a specific price that depends on how you made the strategy, did you use the builder or are you manually coding?

    In manual coding you can use the following example: https://ninjatrader.com/support/help...nce_statis.htm

    Comment


      #3
      Hi!

      I solved it by retrieving the point value of the instrument
      Code:
      pointValue = Instrument.MasterInstrument.PointValue;
      And calculated the stop loss
      Code:
      protectiveSlPrice = execution.Order.AverageFillPrice - pointValue / maxLoss;
      Thank you for the help!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      87 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      128 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      65 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      117 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X