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

  • NinjaTrader_ChelseaB
    replied
    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);

    Leave a comment:


  • TrendFollowingCapital
    replied
    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

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    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.

    Leave a comment:


  • NinjaTrader_ChelseaB
    replied
    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?

    Leave a comment:


  • TrendFollowingCapital
    started a topic Ticks since entry

    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

Latest Posts

Collapse

Topics Statistics Last Post
Started by benmarkal, Yesterday, 12:52 PM
3 responses
22 views
0 likes
Last Post NinjaTrader_Gaby  
Started by helpwanted, Today, 03:06 AM
1 response
18 views
0 likes
Last Post sarafuenonly123  
Started by Brevo, Today, 01:45 AM
0 responses
11 views
0 likes
Last Post Brevo
by Brevo
 
Started by aussugardefender, Today, 01:07 AM
0 responses
6 views
0 likes
Last Post aussugardefender  
Started by pvincent, 06-23-2022, 12:53 PM
14 responses
244 views
0 likes
Last Post Nyman
by Nyman
 
Working...
X