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 cmoran13, 04-16-2026, 01:02 PM
    0 responses
    42 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    25 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    162 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    98 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    157 views
    2 likes
    Last Post CaptainJack  
    Working...
    X