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.
    https://ninjatrader.com/support/foru...269#post802269
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ser1es, Today, 04:26 PM
    0 responses
    5 views
    0 likes
    Last Post ser1es
    by ser1es
     
    Started by ErikY, Today, 02:14 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by NeverDownMoney, Today, 02:32 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Tyler  
    Started by redart1021, Today, 01:14 PM
    2 responses
    11 views
    0 likes
    Last Post redart1021  
    Started by auto112112, Today, 12:36 PM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Working...
    X