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
      22 views
      0 likes
      Last Post SalmaTrader  
      Started by CarlTrading, 07-05-2026, 01:16 PM
      0 responses
      12 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 06-17-2026, 10:32 AM
      0 responses
      8 views
      0 likes
      Last Post CaptainJack  
      Started by kinfxhk, 06-17-2026, 04:15 AM
      0 responses
      10 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 06-17-2026, 04:06 AM
      0 responses
      16 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Working...
      X