Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plotting line like MA

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

    Plotting line like MA

    double price = barsType.Volumes[CurrentBar].TotalVolume;

    after every candle close price value will be updated

    How i can use price to plot line like moving average

    Thank You

    #2
    Hello siddhugaddi,

    Thank you for your post.

    Strategies cannot use plots. You will create an indicator script in order to create a plot via AddPlot() that can plot these values, then you can call AddChartIndicator() in your strategy script to add the indicator to the chart.





    Please let us know if you have any further questions.

    Comment


      #3
      Thank You for your valuable feedback

      Need one more help i want to plot below data to be ploted on chat like barstaric on every candle below how i can do that ???

      Print("Delta for Close: " + barsType.Volumes[CurrentBar].GetDeltaForPrice(Close[0]));
      Print("Ask for Close: " + barsType.Volumes[CurrentBar].GetAskVolumeForPrice(Close[0]));
      Print("Bid for Close: " + barsType.Volumes[CurrentBar].GetBidVolumeForPrice(Close[0]));
      Print("Volume for Close: " + barsType.Volumes[CurrentBar].GetTotalVolumeForPrice(Close[0]));
      Print("Maximum Ask: " + barsType.Volumes[CurrentBar].GetMaximumVolume(true, out price) + " at price: " + price);
      Print("Maximum Bid: " + barsType.Volumes[CurrentBar].GetMaximumVolume(false, out price) + " at price: " + price);
      Print("Maximum Combined: " + barsType.Volumes[CurrentBar].GetMaximumVolume(null, out price) + " at price: " + price);
      Print("Maximum Positive Delta: " + barsType.Volumes[CurrentBar].GetMaximumPositiveDelta());


      Comment


        #4
        If you want to display text below the bar you can use Draw.Text.

        Comment


          #5
          double del =barsType.Volumes[CurrentBar].BarDelta;
          Draw.Text(this, "del", "del", 1000, 1000, Brushes.White);

          did this but i think need to correction its not drawing text on chart

          Comment


            #6
            If you want to display the text stored in your del variable, do not put del in quotes for the text parameter.

            Draw.Text(NinjaScriptBase owner, string tag, string text, int barsAgo, double y, Brush textBrush)

            Comment

            Latest Posts

            Collapse

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