Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 strategist007, Today, 07:51 PM
    0 responses
    3 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,969 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    5 views
    0 likes
    Last Post rbeckmann05  
    Started by rhyminkevin, Today, 04:58 PM
    4 responses
    58 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by iceman2018, Today, 05:07 PM
    0 responses
    6 views
    0 likes
    Last Post iceman2018  
    Working...
    X