Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Place and Moving StopLoss for exact result on future (YM)

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

    Place and Moving StopLoss for exact result on future (YM)

    Hi all,

    i have a very general problem with methode StopLoss for future-trading.
    (https://ninjatrader.com/support/help...erence_wip.htm)

    For the best result of an real 38 Point-SL for future (YM) i developed this three lines of code:

    dStopLoss = 38;
    dSLPrice = (dStopLoss * (Bars.Instrument.MasterInstrument.PointValue / Bars.Instrument.MasterInstrument.TickSize));
    SetStopLoss(sSignalname, CalculationMode.Currency, dSLPrice, false);

    Selected mode (CalculationMode.Currency) seems not right for me, but on live account it results in an real SL of 38 Points from position opening.

    Is my calculation for (dSLPrice) is correct?
    When should i use mode (CalculationMode.Price) instead of (CalculationMode.Currency)?
    What is the difference of this modes?

    Can i move the SL by repeating this three lines of code and halfing (dStopLoss) for example?
    Is it (current close price) + SL?

    How can i move SL in other direction?


    With best regards,
    Peter

    #2
    Hello Peter,

    CalculationMode.Currency is amount of loss (as in profit loss) in dollars (or whatever the brokerage currency is in).

    CalculationMode.Price is an exact price that the order is set to.

    Typically I will use CalculationMode.Price and calculate a price. For example the AveragePrice - 38.

    You can move a stop loss by calling the set method again. Below is a link to an example.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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