Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Previous Days Volume

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

    Previous Days Volume

    Hi, Friends

    In my One min time frame strategy....

    If I want to check Current Volume bar is greater than 30% from previous 10 min volume
    bars so the code will be (VOL()[0]) * (1 + 0.3) > MAX(VOL(), 10)[1].

    But I want to check my Current volume bar is greater than 30% from 10 days volume bars.
    Means I want to check from 10 days in Intraday one min bartime frame strategy.
    So what will be the code (VOL()[0]) * (1 + 0.3) > .......

    Thanks
    Imran.

    #2
    Hello Imran,

    Thank you for your post.

    I am reviewing this post and I will follow up here with information shortly.

    Comment


      #3
      Hello Imran,

      Thank you for your patience.

      You would need to add an additional period type to your code using Add(). So we would add the Day period type and use bars array to call the second bar series into the VOL:
      Code:
      private override void Initialize()
      {
      Add(PeriodType.Day, 1);
      }
      private override void OnBarUpdate()
      {
      ... (VOL()[0]) * (1 + 0.3) > MAX(VOL(BarsArray[1]), 10)[1];
      For information on using multiple time frames and instruments in your NinjaScript code please visit the following link: http://www.ninjatrader.com/support/h...nstruments.htm

      Please let me know if I may be of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      155 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      90 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      137 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      130 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X