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

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
    BertrandNinjaTrader Customer Service

    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 f.saeidi, Today, 12:14 PM
          7 responses
          16 views
          0 likes
          Last Post f.saeidi  
          Started by Russ Moreland, Today, 12:54 PM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by philmg, Today, 12:55 PM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by TradeForge, 04-19-2024, 02:09 AM
          2 responses
          32 views
          0 likes
          Last Post TradeForge  
          Started by aprilfool, 12-03-2022, 03:01 PM
          3 responses
          329 views
          0 likes
          Last Post NinjaTrader_Adrian  
          Working...
          X