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 cmoran13, 04-16-2026, 01:02 PM
    0 responses
    44 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    27 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    163 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    98 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    158 views
    2 likes
    Last Post CaptainJack  
    Working...
    X