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:	92
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:	91
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 NullPointStrategies, Today, 05:17 AM
      0 responses
      32 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X