Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Some stop loss realted questions...

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

    Some stop loss realted questions...

    Hello,

    I am primarily using the Strategy Wizard at this point - if this is not the appropriate sub-forum for these question let me know.

    Can I use and initial stop loss then a trailing stop as profit from market entry increases? Is this a script code only possibility?


    How do I create a math expression such as yesterdays close minus todays close to use in a strategy?

    I have another that I think needs a seperate title so Ill post it separately...

    thanks

    #2
    meegwell, if you like to start with a static stoploss and then later on trail it as profit increases, yes this will need to be done outside of the wizard - http://www.ninjatrader.com/support/f...ead.php?t=3222

    For your custom math, please create an indicator and then run this indicator in the strategy to access its values in your calcs.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Clarification on Stair Stop Script

      Hi Guys,

      In your SamplePriceModification code:

      // Once the price is greater than entry price+50 ticks, set stop loss to breakeven
      if (Close[0] > Position.AvgPrice + 50 * TickSize)
      {
      SetStopLoss(CalculationMode.Price, Position.AvgPrice);
      }

      Are we assuming AvgPrice is the entry price and what is Ticksize, is it = 1pip?

      Also, you mentioned that Ninjatrader will ignore a stoploss for an open position, if there's an order for an entry that would open in the opposite direction, does this mean your stop loss will not work if you run a script that can go long and when conditions reverse, goes Short, meaning you can only ever run in one direction to have your stop losses working? or would you it work if you reversed the SamplePriceModification code to cater for a short position and included it on one script.

      Comment


        #4
        Welcome to our forums - correct the entry is the avg price of the position, ticksize depend on your symbol and what is defined in the instrument manager, generally it's the smallest movement the symbol can make, so 1 pip for FX or 1/10 pip if the connection supports so called pipette values.

        If you try to reverse with other order types than market orders you would run into the 'Internal Order Handling Rules' with the SetStopLoss working - http://www.ninjatrader.com/support/h...d_approach.htm (bottom section here)
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by PhillT, 04-19-2024, 02:16 PM
        4 responses
        34 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Started by ageeholdings, 05-01-2024, 05:22 AM
        5 responses
        37 views
        0 likes
        Last Post ageeholdings  
        Started by reynoldsn, Today, 02:34 PM
        0 responses
        12 views
        0 likes
        Last Post reynoldsn  
        Started by nightstalker, Today, 02:05 PM
        0 responses
        18 views
        0 likes
        Last Post nightstalker  
        Started by llanqui, Yesterday, 09:59 AM
        8 responses
        31 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Working...
        X