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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    475 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    315 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    253 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    340 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    305 views
    0 likes
    Last Post CarlTrading  
    Working...
    X