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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        65 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        149 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        99 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X