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

Adding more Slippage

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

    Adding more Slippage

    Hello and good afternoon,

    Im asking for your help regarding slippage.

    I see that in the defaultfilltype you are referencing:

    FillPrice = Math.Min(NextHigh, NextOpen + SlippagePoints);

    Is there a possibility to choose not the nexthigh or nextlow.
    Maybe the next 2 bars.

    Im testing with renko bars and want to add more slippage than the available nextbar.

    Thank You

    #2
    Hello hliboi,

    Thank you for your post.

    I am not familiar with any available doubles for the Open, High, Low or Close after next. However, I will look into this further and follow up with you when I have additional information.

    Comment


      #3
      Thank You Patrick

      Comment


        #4
        Hello hliboi,

        Thank you for your patience.

        The FillType Class is not documented and therefore neither are the functions or methods available. There is also not much that can be obtained from the Intellisense here either. This area is unsupported, and there would not be any outlets I am aware of for this information.

        However, I was able to test and confirm that using Strategy.Closes[0][-2] will work to pull the close after next. So the low after the next would be Strategy.Lows[0][-2].

        An example of using the close after next:
        Code:
        			if (order.OrderType == OrderType.Market)
        			{
        				FillPrice = Strategy.Closes[0][-2];
        			}

        Comment


          #5
          Hello Patrick,

          First of all thanks.

          As my problem with slippage was the time issue i also played with the settings of delay in the options menu giving me more slippage. Now it doesnt need a price to fill at that entry bar.

          Thanks

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Vietanhnguyen2hotmailcom, Today, 10:29 AM
          0 responses
          1 view
          0 likes
          Last Post Vietanhnguyen2hotmailcom  
          Started by kenz987, Today, 10:20 AM
          0 responses
          4 views
          0 likes
          Last Post kenz987
          by kenz987
           
          Started by llanqui, Today, 09:59 AM
          1 response
          2 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by icebergdelphi, Today, 08:57 AM
          2 responses
          10 views
          0 likes
          Last Post icebergdelphi  
          Started by vitaly_p, Yesterday, 05:09 PM
          3 responses
          29 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X