Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't get new DataSeries to work

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

    Can't get new DataSeries to work

    I'm sure I'm doing something about as stupid as can be. I created a new indicator, opened the script, added a DataSeries variable, initialized it with 'new' in the Initialize() event and added this one line to the OnBarUpdate()

    myDataSeries.Set(Math.Log(Close[0]/Close[1]));
    Plot0.Set(Close[0]);

    It compiles but won't plot anything on the chart. If I comment out the first line, then the Close plots. I used DataSeries a long time ago and don't recall any issues using it. What am I missing?

    EDIT: Please ignore, doesn't look like I can delete. I don't know what the issue was, I'd swear I have it just as I started after changing things one step at a time, and now it works
    Last edited by coolmoss; 03-31-2012, 11:47 AM.

    #2
    Originally posted by coolmoss View Post
    I'm sure I'm doing something about as stupid as can be. I created a new indicator, opened the script, added a DataSeries variable, initialized it with 'new' in the Initialize() event and added this one line to the OnBarUpdate()

    myDataSeries.Set(Math.Log(Close[0]/Close[1]));
    Plot0.Set(Close[0]);

    It compiles but won't plot anything on the chart. If I comment out the first line, then the Close plots. I used DataSeries a long time ago and don't recall any issues using it. What am I missing?

    EDIT: Please ignore, doesn't look like I can delete. I don't know what the issue was, I'd swear I have it just as I started after changing things one step at a time, and now it works
    if(CurrentBar <= 2)return;
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    618 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    359 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    561 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    566 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X