Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help - Simple BB reversion strategy

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

    Help - Simple BB reversion strategy

    Hi All,

    I am still getting familiar with NT8 strategy building and have a few intraday strategies which I am testing fine, but I am having trouble getting a daily BB based strategy to execute.

    Hoping someone with more experience can point me in the right direction.

    Click image for larger version

Name:	Screenshot 2023-04-28 at 11.07.04 am.png
Views:	151
Size:	77.9 KB
ID:	1248734

    #2
    Have you tried doing this with Strategy Builder? That seems well within its capabilities. You could then unlock the code and see how it does it in NinjaScript.
    Last edited by QuantKey_Bruce; 04-27-2023, 07:19 PM.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      hi there, yes this was done using strategy builder, I just displayed using script for ease of sharing.

      Comment


        #4
        Hello, thanks for writing in.
        In the Bollinger Bands indicator, the upper band is typically set to two standard deviations above the moving average, while the lower band is set to two standard deviations below the moving average. The high price of any instrument will not cross below the low of the lower Bollinger Band if the price is within the band's range. You can adjust the band being used in the left side of your condition, in the Bollinger Band settings "Plot Value". You can also debug your strategy using a Print and drawing to visually help explain the output of the strategy (i.e. No output or drawing object = condition is not true)

        In your stop loss, the "From Entry Signal" should have a capital L at the beginning. This string field is case-sensitive, so the Entry Signal And From Entry Signal must be exactly the same.
        Attached Files

        Comment


          #5
          Thanks!

          I am getting an error in the logs for "BarsRequiredToTrade" has not been met (screenshot attached).

          I have tried change the BRTT default to a value of 1, 5 and 50 and get the same error each time.

          Attached Files

          Comment


            #6
            After you changed your code where it is setting BarsRequiredToTrade = 50 or whatever, did you remove the strategy from the chart and add it back again? Because that setting is in State.SetDefaults it could be still remembering the previous value because it's saved on the chart itself from when you added the strategy the first time (which might have been before you changed the default and recompiled). Or, check your chart to see if the property Bars required to trade is changed on that instance of the strategy.
            Bruce DeVault
            QuantKey Trading Vendor Services
            NinjaTrader Ecosystem Vendor - QuantKey

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NTEducationTeam, Today, 01:49 PM
            0 responses
            12 views
            0 likes
            Last Post NTEducationTeam  
            Started by NTEducationTeam, Today, 01:24 PM
            0 responses
            10 views
            0 likes
            Last Post NTEducationTeam  
            Started by saltminer, 07-07-2025, 01:43 PM
            1 response
            112 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by idude, 07-08-2025, 05:06 AM
            0 responses
            50 views
            0 likes
            Last Post idude
            by idude
             
            Started by music_p13, 07-05-2025, 11:33 PM
            1 response
            53 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X