Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CCI Ninja Versus CCI Tradestation

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

    CCI Ninja Versus CCI Tradestation

    I am trying to load the CCI on ninja and get it to line up with the CCI in tradesation, it doesn't seem to want to. It comes close, but not quite right. The trigger seems to be much faster. Does anyone have any ideas, or if you can convert the following code, I would be very appreciative.

    inputs:
    Length( 14 ),
    CCIAvgLength( 9 ),
    OverSold( -100 ),
    OverBought( 100 ),
    OverSColor( Cyan ),
    OverBColor( Red ) ;
    variables:
    CCIValue( 0 ) ,
    CCIAvg( 0 ) ;
    CCIValue = CCI( Length ) ;
    CCIAvg = Average( CCIValue, CCIAvgLength ) ;
    Plot1( CCIValue, "CCI" ) ;
    Plot2( OverBought, "OverBot" ) ;
    Plot3( OverSold, "OverSld" ) ;
    Plot4( CCIAvg, "CCIAvg" ) ;
    { Color criteria }
    if CCIValue > OverBought then
    SetPlotColor( 1, OverBColor )
    else if CCIValue < OverSold then
    SetPlotColor( 1, OverSColor ) ;
    { Alert criteria }
    if CCIValue crosses over OverSold then
    Alert( "Indicator exiting oversold zone" )
    else if CCIValue crosses under OverBought then
    Alert( "Indicator exiting overbought zone" ) ;

    #2
    Hi bamill11,

    Which CCI indicator in NinjaTrader have you loaded for comparison?

    Your TS code uses a Simple Moving Average as the trigger for the CCI ... please check out our second indicator building tutorial, as it may help you construct your custom CCI - http://www.ninjatrader-support.com/H...verview18.html

    Alternatively, you use the 'CCIMovingAverage' from our sharing section - http://www.ninjatrader-support2.com/...rch=CCI&desc=1

    You can also contact one of our NinjaScript development partners for programming assistance - http://www.ninjatrader.com/webnew/pa...injaScript.htm

    Comment


      #3
      Assuming both indicators are 100% identical, they may be a little off for two reasons.

      1. Data Feed differences. If you're using a different data feed on TS than NT, you will have different prices. Although these differences may be small, they will nonetheless cause calculation offsets between the two platforms.
      2. Depending on which data feed you are using for NT, NT may time stamp bars with the PCs clock, where as TS time stamps bars with a central server time. This time difference will change the bars Open / Close values which could also cause a slight misalignment between the two platforms.

      Both of these *ideas* are datafeed dependent. If you're working in the forex world with GAIN data on both platforms, and the indicators are computationally 100% the same, they should yield the same results.

      hope this helps a little
      mrlogik
      NinjaTrader Ecosystem Vendor - Purelogik Trading

      Comment


        #4
        mrlogik,

        I think you are probably correct, it is more than likley a difference in data feeds. On ninja I am using zen-fire on TS it is TS, so probaly slightly different. The patterns look very similar though, good enough for what I am doing. I was just curious if anyone knew if there were any differences in calculation of CCI between the Ninja version and the TS ver. I am using the CCI indicator native to Ninja overlayed with the CCIMA downloaded from this forum.

        Comment


          #5
          A while back I did a data feed comparison between MB Trading and TS Gain data. During the main session times the data feeds were <= 1 pip apart. During the off time when no markets are open, they could be <= 6 pips apart.

          If the period for your CCI is large enough you can get this "off time data" into your indicator calculation, which could throw it off a little.

          just some thoughts.
          mrlogik
          NinjaTrader Ecosystem Vendor - Purelogik Trading

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          580 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          335 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X