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 Tim-c, Today, 03:54 AM
        0 responses
        3 views
        0 likes
        Last Post Tim-c
        by Tim-c
         
        Started by FrancisMorro, Today, 03:24 AM
        0 responses
        2 views
        0 likes
        Last Post FrancisMorro  
        Started by Segwin, 05-07-2018, 02:15 PM
        10 responses
        1,771 views
        0 likes
        Last Post Leafcutter  
        Started by Rapine Heihei, 04-23-2024, 07:51 PM
        2 responses
        31 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by Shansen, 08-30-2019, 10:18 PM
        24 responses
        945 views
        0 likes
        Last Post spwizard  
        Working...
        X