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 NullPointStrategies, Today, 05:17 AM
            0 responses
            50 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            126 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            69 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            42 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            46 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X