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 Brevo, Today, 01:45 AM
        0 responses
        6 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        3 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        6 views
        0 likes
        Last Post oviejo
        by oviejo
         
        Working...
        X