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 frslvr, 04-11-2024, 07:26 AM
    9 responses
    123 views
    1 like
    Last Post caryc123  
    Started by rocketman7, Today, 09:41 AM
    4 responses
    15 views
    0 likes
    Last Post rocketman7  
    Started by selu72, Today, 02:01 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by WHICKED, Today, 02:02 PM
    2 responses
    15 views
    0 likes
    Last Post WHICKED
    by WHICKED
     
    Started by f.saeidi, Today, 12:14 PM
    8 responses
    21 views
    0 likes
    Last Post f.saeidi  
    Working...
    X