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 sjsj2732, Yesterday, 04:31 AM
      0 responses
      31 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      286 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      283 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      133 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      91 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X