Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DataSeries Weirdness

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

    DataSeries Weirdness

    I am expecting the Print() statements below to output the exact same value, but they are not. It appears that an indicator created from a DataSeries behaves differently than the same indicator created using the default DataSeries. Can someone show me what I am doing wrong?

    private CCI ind1;
    private CCI ind2;
    private DataSeries dataSeries;


    protected override void Initialize()
    {
    ind1 = new CCI();
    ind2 =
    new CCI();
    dataSeries =
    new DataSeries(this);
    }

    protected override void OnBarUpdate()
    {
    dataSeries.Set(Close[
    0]);
    ind1 = CCI(
    12);
    ind2 = CCI(dataSeries,
    12);

    Print(ind1[
    0].ToString());
    Print(ind2[
    0].ToString());
    }

    Output:
    -116.870986573268
    -118.665114474188

    Last edited by CashCache; 09-04-2008, 07:47 PM.

    #2
    I got this worked out. Everything works great if you add the right value to the DataSeries

    Thanks...

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    152 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    87 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    131 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    127 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    106 views
    0 likes
    Last Post CarlTrading  
    Working...
    X