Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

simple volume value draw on chart ?

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

    simple volume value draw on chart ?

    Hi how can I display volume value on chart

    I put this below into a copy of a sample ma strategy, but no value appears at the buys on the chart ?
    am I placing this in the wrong event handler?

    protected override void OnBarUpdate()
    {
    if (BarsInProgress != 0)
    return;

    if (CurrentBar < BarsRequiredToTrade)
    return;

    if (CrossAbove(smaFast, smaSlow, 1))
    {
    EnterLong();

    Draw.Text(this, "VOLUME", Volume[0].ToString(), 0, Volume[0] , Brushes.Yellow);

    }

    #2
    Hello obwon1,

    Welcome to the NinjaTrader forums!

    Are you expecting this on every occurrence or just the most recent one? (use unique tag names for multiple objects)


    To confirm this text is not appearing once in the Drawing Objects window?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      ok tnx im not getting any output when use draw
      yes only on event do I want it draw text

      also im trying to add multiple data series so that I can reference them in my conditions

      else if (State == State.Configure)
      {

      AddDataSeries("XYZ 02-22", Data.BarsPeriodType.Minute, 2, Data.MarketDataType.Last);
      AddDataSeries("XYZ 02-22", Data.BarsPeriodType.Minute, 3, Data.MarketDataType.Last);
      AddDataSeries("XYZ 02-22", Data.BarsPeriodType.Minute, 5, Data.MarketDataType.Last);

      but only 1 appears when I add the strategy to a chart ?
      how can I get all 3 data series


      Comment


        #4
        what id like to do is track the volma or chalkvol for each series

        cvol = ChaikinVolatility(10, 10);

        and then draw that value to the screen when triggered

        Comment


          #5
          Hello obwon1,

          Is the Strategy enabled, showing the Enabled checkbox checked on the Strategies tab of the Control Center?

          Add a print above the condition that prints smaFast[1] < smaSlow[1] & smaFast[0] > smaSlow[0].

          Below is a link a link to a forum post that demonstrates using prints to understand behavior.


          Be sure to save the output to a text file and include this with your next post.

          With the added series complexity, are you printing Times[1][0] when CurrentBars[1] is greater than 1, and is this causing an error?
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          47 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          23 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          33 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          51 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Working...
          X