Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Count how many ticks is in date range. For example: from last 3600 seconds

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Count how many ticks is in date range. For example: from last 3600 seconds

    Hello,

    I am new in NinjaScript development and I am trying to learn how to code in NinjaScript and because of it I am doing many testing and exercises.
    Currently I have goal to develop indicator which will give Long or Short signals.
    Inputs are:
    AmountOfSeconds = 3600;
    PercentChangeInPrice = 1;
    NumberOfTicks = 100;
    VolumeTraded = 10;

    So signals are:
    Long setup:
    1) In last 3600 seconds price changed at least 1% in positive direction(moving up).
    2) in last 3600 seconds ticks was equal or more then 100.
    3) in last 3600 seconds traded volume was equal or more then 10.
    Short setup:
    reversal of Long setup.

    So my main problem is that I don't know how to find:
    1) exact price 3600 seconds ago.
    2) how many ticks we had in last 3600 seconds.
    3) what was volume 3600 seconds ago.

    Hope someone could help me.

    Thanks in advanced.

    #2
    Duplicate post in Strategy Forum: https://ninjatrader.com/support/foru...t-3600-seconds
    Last edited by NinjaTrader_PaulH; 11-16-2020, 01:13 PM.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    601 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    347 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    559 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    558 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X