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:	65
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 judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            59 views
            0 likes
            Last Post DynamicTest  
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            36 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            7 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            21 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            10 views
            0 likes
            Last Post cre8able  
            Working...
            X