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 sjsj2732, 03-23-2026, 04:31 AM
    0 responses
    69 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    312 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    306 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    146 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    105 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X