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

Combining tick counter with my indicator

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

    Combining tick counter with my indicator

    Hello, I'm very inexperienced with ninjascript, but somehow I managed to write a basic indicator to change from 0 to 1 when the conditions that I find valuable are present.

    Close[0]<SMA(a)
    Close[0]<EMA(b)
    ...

    Now I'd like to combine this indicator with tick counter so the resulting indicator awaits until the xxx ticks bar is > yy % complete before changing its value if the right conditions are present so I can use it with the market analyzer and I can have some time to prepare the trade before the bar closes.

    Please can anybody help me?

    Cheers

    Francisco

    #2
    Hello,

    Thank you for the question.

    If you are wanting to check the bars Percent Complete, this can be done using the following line:

    Code:
    Bars.PercentComplete
    This returns a double value 0.1 - 1 regarding the percent complete, this value is likely to change depending on the chart these values were from a 10 tick chart.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks a lot

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by pechtri, 06-22-2023, 02:31 AM
      10 responses
      124 views
      0 likes
      Last Post Leeroy_Jenkins  
      Started by judysamnt7, 03-13-2023, 09:11 AM
      4 responses
      59 views
      0 likes
      Last Post DynamicTest  
      Started by ScottWalsh, Yesterday, 06:52 PM
      4 responses
      36 views
      0 likes
      Last Post ScottWalsh  
      Started by olisav57, Yesterday, 07:39 PM
      0 responses
      7 views
      0 likes
      Last Post olisav57  
      Started by trilliantrader, Yesterday, 03:01 PM
      2 responses
      22 views
      0 likes
      Last Post helpwanted  
      Working...
      X