Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop Loss value

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

    Stop Loss value

    Hi,
    Due to an error in the implementation on my strategy I am looking a very strange calculation of the Stop Loss.
    I have the next code for the protection:

    SetStopLoss(CalculationMode.Currency, SL);

    In the current implementation the value of SL goes negative, so it is working as a profit target.
    What I do not understand is how the value is set.
    In the image attached you can see the information of the candle where the code of the order and SL are launched (green candle at 15:00:00).
    At this candle, I printed the value of SL, being this -16250,41.
    The calculation mode is Currency, and the instrument is NQ, so I understand that the protection should be of 16250/20 = 812$, however the trade has a profit of 45$.

    What am I misunderstanding?

    #2
    Hello jemoce,

    Thank you for the post.

    The Currency calculation mode allows you to input a PnL dollar amount relative to your average entry. If you wanted a $20 max loss stop loss, then you would enter 20 as the value parameter. In an instrument like the NQ, for example, where each tick is worth $5, a stop will be placed 4 ticks against your average entry price. This will allows for up to $20 to be lost in the trade.

    The stop loss in the trade you posted looks like it was named incorrectly. If that was a short trade, then the profit target should have been the price hit, not the stop loss. I would need to test your code to look into the matter further. Please Export the strategy, then if you don't mind posting it here you may, or you may email it to platformsupport[at]ninjatrader[dot]com, referencing "ATTN ChrisL" in the body of the email.

    I look forward to your reply.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    65 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X