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 in current price percents.

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

    Slippage in current price percents.

    Hello.
    I saw that slippage normally is set in ticks.
    How to set the slippage as a percent?

    #2
    Hello Czarek,

    Thank you for your post.

    Which slippage are you referring to? I suspect you might mean the slippage property used for calculations during backtests, though I would like to confirm to make sure we are discussing the same thing.

    If this is not what you mean, please provide a link to the page you saw or send a screenshot so I may better understand and assist you.
    • To send a screenshot with Windows 10 or newer I would recommend using the Windows Snipping Tool.
    • Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save it as a jpeg file and send the file as an attachment.
    ​I look forward to your reply.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Yes I mean slippage property and I already got it. Problem is that even i set very big slippage order is placed not lower than candle low.
      O would like to backtest scenario like on the image. I'm not sure I can set entry price outside the real prices range??


      Click image for larger version

Name:	image.png
Views:	64
Size:	65.8 KB
ID:	1254836

      Comment


        #4
        Hello Czarek,

        Thank you for your reply.

        As described on the page for historical fill processing, "Slippage can be added to your order fills to help mimic real market conditions. The value is expressed in "ticks", the minimum value of fluctuation for an instrument, and is only applied to market, stop-market and Market-if-touched orders. NinjaTrader will add the slippage to each order however you cannot have more slippage then the high/low price of the next bar."


        The way that the algorithm works for historical order fills, you are not able to get an entry price that extends beyond the high or low price of the next bar.

        Please let us know if we may be of further assistance.
        Emily C.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your reply.
          In this case I'm going to use StopLimit orders and entry position if price goes to my desired level.
          I would like to save to variable entry signal bar bar and then count number of bars to exit. How to save the entry signal bar to variable?

          Comment


            #6
            Hello Czarek,

            You would need to make an int variable and then assign the CurrentBar at the time of the event. To find the number of bars you would subtract your variable from the CurrentBar variable to get a number of bars.
            JesseNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by frankthearm, Today, 09:08 AM
            7 responses
            28 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by NRITV, Today, 01:15 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by maybeimnotrader, Yesterday, 05:46 PM
            5 responses
            25 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by quantismo, Yesterday, 05:13 PM
            2 responses
            16 views
            0 likes
            Last Post quantismo  
            Started by adeelshahzad, Today, 03:54 AM
            5 responses
            33 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X