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 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