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:	101
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:	101
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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      20 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      29 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      46 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      38 views
      0 likes
      Last Post CarlTrading  
      Working...
      X