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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    561 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    325 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
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X