Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to display Volume Daily

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

    How to display Volume Daily

    Hello,

    I am looking for a method to display exact Volume daily on my charts.

    There is a Ninja script to get Volume from time and sales window ?

    If I use a Daily chart and following simple script:

    #region Variables
    private double myInput0;
    private Font textfont=new Font("Arial",10);
    #endregion

    OnBarUpdate()
    myInput0=Volume[0];
    string text=string.Format("Volumi: {0}",myInput0);
    DrawTextFixed("Info",text,TextPosition.BottomRight ,Color.White,textfont,Color.Transparent,Color.Tran sparent,0);

    There are little differences between volume generated from my script and time and sales.

    #2
    Hello merzo,

    To get the Time and Sales Windows Daily Volume, you will want to use the OnMarketData() method for this as there is a Daily Volume that most providers report.

    For example:
    Code:
    protected override void OnMarketData(MarketDataEventArgs e)
    {
        // Print data to the Output window
        if (e.MarketDataType == MarketDataType.DailyVolume)
             Print("Daily Volume " + e.Volume);
    }
    JCNinjaTrader Customer Service

    Comment


      #3
      Hello JC,

      thanks for your help.

      Your script works well and fast

      Best

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bortz, 11-06-2023, 08:04 AM
      47 responses
      1,602 views
      0 likes
      Last Post aligator  
      Started by jaybedreamin, Today, 05:56 PM
      0 responses
      8 views
      0 likes
      Last Post jaybedreamin  
      Started by DJ888, 04-16-2024, 06:09 PM
      6 responses
      18 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by Jon17, Today, 04:33 PM
      0 responses
      4 views
      0 likes
      Last Post Jon17
      by Jon17
       
      Started by Javierw.ok, Today, 04:12 PM
      0 responses
      12 views
      0 likes
      Last Post Javierw.ok  
      Working...
      X