Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Slippage

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

    Slippage

    Hi,

    I apply the slippage with code in the initialize() method within the strategy: Slippage=1;

    But, the strategy analyzer applies slippage only when the strategy gets in the market. But, it does not apply it in exits orders as StopLoss or ProfitTarget.


    I mean, in a long position i enter 1 tick above entry level, but I exit in the exact price my SL or TP are.


    I use unmanaged approach.

    Any clue why it’s happening?


    Thanks

    #2
    Hi CJS,

    Slippage only applies to market and stop market orders, so you wouldn't see it ever on profit target orders (limit) or if your stop loss is stop limit.

    It will only be applied if the bar the order is filled on could have accomodated slippage.
    Last edited by NinjaTrader_RyanM1; 11-08-2011, 11:47 AM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      Ok, thanks for the info.

      Another doubd.

      I am trailing SL to break even. As a BE price I use Position.AvgPrice

      But, in the strategy analyzer the order is trailed 1 tick away from Position.AvgPrice level.

      Anf i try to add 1*TickSize, then the SL is trailed to 1 tick away the level (but in this case in the other direction)

      Is it normal?

      Thanks again

      Comment


        #4
        You will need to Print() all values of your order, as well as monitor for messages related to order submission with TraceOrders output.

        It only places orders at the levels you specify, so some debugging is needed here to confirm all values:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 03:20 PM
        0 responses
        5 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        47 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        114 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by The_Sec, Today, 02:29 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by jeronymite, 04-12-2024, 04:26 PM
        2 responses
        31 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X