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

Multi Time Frame with Multi Instruments , Spread and Bollinger Bands

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

    Multi Time Frame with Multi Instruments , Spread and Bollinger Bands

    Hello,

    I am programming an strategy with two different instruments and different Time Frames.

    in this strategy I use the Cross Above of the Spread of this two instruments with the Lower Bollinger Band of this Spread (as Input Data Series) to enter a long order , the problem it is that I use the Spread of this two instruments in 1 minute bar when it crosses the Lower Bollinger Band of the Spread of 15 minute bar , then I need to use the BarsArray :

    if (BarsInProgress == 3)
    {
    CrossAbove(Spread( contracts0,-contracts1,symbol2,useMultiplier),Bollinger( BarsArray[2],Spread( contracts0,-contracts1,symbol2,useMultiplier),numStdDev, period ).Lower[ barsAgo] , 1))
    }

    as Bollinger Bands only supports 3 arguments:

    Bollinger(IDataSeries input, double numStdDev, int period).Lower[int barsAgo]

    when I compile the strategy appears an error that says Bollinger method do not accepts 4 arguments .

    What should I do to solve this problem?

    many Thanks
    Albert

    #2
    Hi Albert, sounds to me like you would need to supply the BarsArray[2] to the spread indicator as input series to run on and then use this series in your Bollinger Band call for the conditions?
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ageeholdings, Today, 07:43 AM
    0 responses
    7 views
    0 likes
    Last Post ageeholdings  
    Started by pibrew, Today, 06:37 AM
    0 responses
    4 views
    0 likes
    Last Post pibrew
    by pibrew
     
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    14 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    12 views
    0 likes
    Last Post burtoninlondon  
    Working...
    X