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

BuySellPressure indicator problem

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

    BuySellPressure indicator problem

    Hi,

    I am trying to get sell\buy pressure from the BuySellPressure indicator but I am getting ZERO value.

    I am using the indicator In real time and the indicator is plotting OK in the chart

    I used the indicator as explain in NT document:

    protected override void Initialize()
    {
    BuySellPressure().CalculateOnBarClose = false;
    }

    protected override void OnBarUpdate()
    {
    m_BuylPress = BuySellPressure().BuyPressure[0];

    // This print is only for debug because I the "BuySellPressure" indicator always return
    // ZERO
    Print(Time[0] + ":" + "SellPressure[0] = " + BuySellPressure().BuyPressure[0]);


    }

    sincerely,Kobi

    #2
    Hello Kobi,

    Thank you for your note.

    I would expect this to be 50 for historical data, as the BuySellPressure only works off of Real time data.

    Are you seeing that it prints 0 for real time data or just historical?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hello NinjaTrader_Cal,

      You right for Historical data I would expect this to be 50 for historical data,
      I am running real time data and the value is ZERO.

      I am seeing that it prints 0 for real time data

      Kobi

      Comment


        #4
        Hello levikNT,

        Thank you for your response.

        If you add the following to the beginning of the OnBarUpdate() method do you still see zeroes on the real-time data?
        Code:
        if(Historical)
        return
        ;

        Comment


          #5
          Hello PatrickH,

          I got ZERO even if I put this code

          if(Historical)
          return;

          as I mention the BuySellPressure indicator is plotting OK in the chart.
          but tried to get the Buy\Sell pressure from another indicator FAILED!!.
          I always get ZERO even so I put the above code restriction.

          Even if I don't put the "if(Historical) return;" code , I should get the value the BuySellPressure indicator displaying in the chart.

          Sincerely,Kobi

          Comment


            #6
            Hello Kobi,

            Thank you for your response.

            Can you provide the script you are testing? My tests are providing correct values from the BuySellPressure when called from another indicator.

            Comment


              #7
              To update the thread, the issue was the attempt to override the called indicators COBC in the Initialize(). Once this was removed or attempted only from OBU the received values were ok.

              This is a known limitation in NT7 and thus our recommendation would be not having hardcoded any COBC setting in your to be called scripts, and only setting as needed from the calling study. This is an area that will be made more consistent with our next major upgrade.
              BertrandNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Brevo, Today, 01:45 AM
              0 responses
              6 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              3 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              242 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              384 views
              1 like
              Last Post Gavini
              by Gavini
               
              Started by oviejo, Today, 12:28 AM
              0 responses
              6 views
              0 likes
              Last Post oviejo
              by oviejo
               
              Working...
              X