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 Taddypole, 04-26-2024, 02:47 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Started by futtrader, 04-21-2024, 01:50 AM
    6 responses
    58 views
    0 likes
    Last Post futtrader  
    Started by sgordet, Today, 11:48 AM
    0 responses
    4 views
    0 likes
    Last Post sgordet
    by sgordet
     
    Started by Trader146, Today, 11:41 AM
    0 responses
    5 views
    0 likes
    Last Post Trader146  
    Started by jpapa, 04-23-2024, 07:22 AM
    2 responses
    19 views
    0 likes
    Last Post rene69851  
    Working...
    X