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

Ticks since entry

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

    Ticks since entry

    Hi Support

    Hoping I could get some assistance with this, I am well aware of the feature "bars since entry / bars since exit" but I am looking to find a solution for "ticks since closest entry"

    My strategy enters multiple entries per direction on 1 candle based on a retracement value in ticks, but often the entries are all stacked together on the candle, how can I still have multiple entries per direction on 1 candle but entries only execute if they are x ticks away from any open position, therefore spreading the entries evenly on the candle instead of bunching them all together so more of the candle can be used?

    See screenshot:
    Attached Files

    #2
    Hello TrendFollowingCapital,

    Are you looking for a distance with "Ticks", in amount of price change since entry or exit, or the number of "Ticks" as number of last transactions since last exit?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello TrendFollowingCapital,

      Are you looking for a distance with "Ticks", in amount of price change since entry or exit, or the number of "Ticks" as number of last transactions since last exit?
      I.E. record the price, divide by TickSize, or integer that updates a counter for every tick.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Hi Chelsea

        I am looking to spread the entries on a wick (candle), and I would like to have a customisable input to define what that value can be.
        Take an example of a candle that is 200 ticks, my strategy enters positions up and down that candle but sometimes the orders are bunched close together, I am looking for the option to still let the strategy enter positions up and down the wick, but have a filter to not enter an order within x ticks of an open order, any open order. So if that value it 10 ticks, then the gap between all orders on that candle must not be less than 10 ticks and if the strategyu wants to enter a position, it will 1st have to check where the closest order is and make sure it is not within 10 ticks from an existing order.
        I am not concerned about the exits, they have targets and stops, just the entries themselves need to be spread out.

        Hope that helps, thanks, Jason

        Comment


          #5
          Hello Jason,

          Have a look at the SMA indicator and how the Period input is declared on lines 84 to 87.

          Also below is a link to the help guide.


          You can add or subtract a multiple of TickSize to add or subtract ticks from a price in your conditions, or divide by the TickSize to get a number of ticks.
          For example:

          Print(High[0] + 3 * TickSize);
          Print((High[0] - Close[0]) / TickSize);
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by frankthearm, Today, 09:08 AM
          7 responses
          29 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
          17 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