Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CrossAbove with Multitimeframes

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

    CrossAbove with Multitimeframes

    Hello,

    Probably a newbie question but I would like to know how to use the CrossAbove function using multitimeframes.

    So basically I have added three extra timeframes using the Add(PeriodType.Minute, xxx); function.

    Now when I enter the following code:

    Code:
    		if (CrossAbove(CCI(Closes[1],20)[0],-100,1)) {
    				Print("True");	
    			}
    Basically I want to see if the CCI for the 1st added timeframe crosses above -100 within the last bar is true.

    If gives me the following error:

    Strategy\CCICross.cs The best overloaded method match for 'NinjaTrader.Strategy.StrategyBase.CrossAbove(doub le, NinjaTrader.Data.IDataSeries, int)' has some invalid arguments CS1502 - click for info 60 8

    Strategy\CCICross.cs Argument '2': cannot convert from 'int' to 'NinjaTrader.Data.IDataSeries' NT1503 - click for info 60 40


    Help!

    #2
    Hello siroki,

    Thank you for your post.

    You would need to use BarsArray[1] in place of Closes[1] for the CCI() method. For information on BarsArray please visit the following link: http://www.ninjatrader.com/support/h.../barsarray.htm

    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    149 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    84 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    129 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    125 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    102 views
    0 likes
    Last Post CarlTrading  
    Working...
    X