Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Confirmation by a slower Timeframe

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

    #31
    Hello Brett

    Sorry to bump this old thread again, but I'm having trouble with a syntax issue regarding a secondary series:
    I'm using the standard BidAskHistVolume indicator in a Multi-Timeframe & Multi-Instrument strategy.

    The two variables from the indicator I'm using are: buy / sell

    buy = buys;
    sell = sells;
    buys = 0;
    sells = 0;

    In a Single-Timeframe strategy, the following snippet works fine:

    if (buy > sell && my conditions here) etc

    But in a Multi-Timeframe Strategy, I'm not sure about the correct syntax if I want to use the buys/sells from the secondary series. I've tried

    if(buy Closes[1] > sell Closes[1])

    but it won't compile.

    I would really appreciate it if you could show me the correct syntax of the above snippet.

    Thanks a lot.

    Comment


      #32
      Originally posted by laocoon View Post

      if(buy Closes[1] > sell Closes[1])

      but it won't compile.
      This isn't compiling because from the looks of it buy and sell are ints and Closes[1] is a data series

      your if statement reads

      if(someInt DataSeries > someotherInt DataSeries)

      I may need some further clarification on your end goal but my guess is that this can be solved by isolating the condition to a different BIP

      for example

      Code:
      if(BarsInProgress == 1)
        if(buy < sell)
          //do something
      Please see this for more information on using BIP: http://www.ninjatrader.com/support/h...nstruments.htm
      LanceNinjaTrader Customer Service

      Comment


        #33
        Hello Lance,

        Thanks for your reply. My end goal here is very easy: I'm using the standard Ninja BidAskHist Volume indicator on a Secondary Series as a trigger for a trading signal in a Primary Series.As you highlighted, BIP is the solution to the problem here. Will work further on this and let you know how it goes. Thanks again for your help.
        Last edited by laocoon; 03-25-2013, 09:33 AM.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, Yesterday, 10:06 AM
        0 responses
        22 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        19 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        14 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        10 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        41 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X