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
      4 responses
      113 views
      0 likes
      Last Post Nyman
      by Nyman
       
      Started by Tim-c, Today, 03:54 AM
      2 responses
      11 views
      0 likes
      Last Post Tim-c
      by Tim-c
       
      Started by gnocchi, Today, 11:56 AM
      1 response
      2 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by FAQtrader, Today, 12:00 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by geddyisodin, Today, 05:20 AM
      5 responses
      32 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X