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

Using Buy Sell Pressure Indicator To Run A Strategy

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

    Using Buy Sell Pressure Indicator To Run A Strategy

    I'm using the Buy Sell Pressure Indicator to set up a strategy and I can not figure out how set up the If Any part in Conditions and Actions. I want to trigger a long position if the buy pressure goes above 58% and after that a short position if the sell pressure goes above 58%.

    #2
    Hello Sadat,

    You would need two conditions sets. One condition set that compares Indicator -> BuySellPressure -> BuyPressure plot to be greater than Misc -> Numeric value set to 58. The action for this condition set will be Order Management -> Enter long position.

    The second condition set will be comparing the SellPressure to be greater than 58 and the action will be to place Enter short position.

    One thing to note, is that the BuySellPressure Indicator only works in real-time. So you would likely want to prevent your script from working historically or being backtested. (Or use TickReplay)

    I highly recommend you review the Strategy Builder 301 video which demonstrates how to use the Strategy Builder.
    Below is a public to this training video.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,

      I set it up and looked at the 301 video and it is not taking trades in real time. I have seen the Buy Pressure go above 58 several times and no trade. Do you know what could be the problem?

      Comment


        #4
        Hello Sadat,

        Using a print added in an empty condition set that prints the value of BuySellPressure().BuyPressure[0], I found the value is always 50.

        Then I found a comment in the indicator code.

        "/// This is a tick by tick indicator. If 'Calculate on bar close' is true, the indicator values will always be 100."

        This should actually say:
        "This is a tick by tick indicator. If 'Calculate' is .OnBarClose or .OnPriceChange, the indicator values will always be 50."

        The gist is, your strategy needs to be Calculate.OnEachTick to use this indicator.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,
          I was able to figure out what you advised me to do. Thanks for your help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by yertle, Today, 08:38 AM
          2 responses
          7 views
          0 likes
          Last Post yertle
          by yertle
           
          Started by dappa, Today, 09:18 AM
          0 responses
          1 view
          0 likes
          Last Post dappa
          by dappa
           
          Started by bill2023, Yesterday, 08:51 AM
          4 responses
          22 views
          0 likes
          Last Post bltdavid  
          Started by trilliantrader, Today, 08:16 AM
          3 responses
          9 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
          79 responses
          19,662 views
          5 likes
          Last Post zrobfrank  
          Working...
          X