Announcement

Collapse
No announcement yet.

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.

    Comment


      #3
      Thanks a lot

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      82 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      43 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      56 views
      0 likes
      Last Post CarlTrading  
      Working...
      X