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 NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          54 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          130 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          72 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          44 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X