Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DataSeries

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

    DataSeries

    I am trying to create an indicator to calculates
    VV = (Close[0] - Close[1])/Tick Size;
    I create a Data Series how follow

    #region Variables
    private DataSeries VV;
    #endregion

    protected override void Initialize()
    {
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "VPlot0"));
    VV = new DataSeries(this);
    Overlay = false;
    }

    protected override void OnBarUpdate()
    {

    VV.Set((Close[0] - Close[1])/TickSize);
    VPlot0.Set(VV[0]);
    }
    In the graph it creates a new panel but does not plot anything. What am I doing wrong?

    #2
    Hello sasil,

    Thank you for your post.

    Check the Log tab of the Control Center for any errors after enabling the indicator.

    Likely you will need to use the following code in OnBarUpdate():
    Code:
    if(CurrentBar <= 1)
    return;
    For more information please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=3170

    Comment


      #3
      ok it worked
      thanks..

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      18 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      8 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      622 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      420 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      293 views
      1 like
      Last Post charlesugo_1  
      Working...
      X