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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    169 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    326 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    251 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    353 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    180 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X