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

Question about Calculate on Bar close

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

    Question about Calculate on Bar close

    Hi,

    Can someone told me how I can set the Stochastic Color Indicator to
    "calculate on bar close" and the Woodie CCI Indicator to "real time" in the
    Strategy Setup.

    Seems like I can only setup both to bar close or not.


    Thanks in advance for your help

    Regards,
    slowhand

    #2
    Hi slowhand, you are correct: there is one setting for the complete strategy.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Hi slowhand, you are correct: there is one setting for the complete strategy.

      Hi NinjaTrader_Bertrand,

      Ok, thanks very much for your quick reply


      Regards,
      slowhand

      Comment


        #4
        Along those same lines, I was just going to make a new thread. If I have an indicator consisting of two or three different indicators, is there a was to have one update on bar close when the other one or two are set to CalculateOnBarClose = false;?
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          Hi eDanny, to realize this you would set all CalculateOnBarClose to false in the embedded / called indicators. Whichever you want to process on CalculateOnBarClose = True you call with if (FirstTickOfBar) and adjust your trading logic to reference one bar back.
          BertrandNinjaTrader Customer Service

          Comment


            #6
            Thanks, I'll check it out.
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment


              #7
              I have the same problem. But I can't just have the strategy to reference one bar back because the result of my custom indicator will be different for CalculateOnBarClose=true vs false.

              In other words, just by running the custom indicator, I need the CalculateOnBarClose set to TRUE to produce the correct result.

              Pls advice.

              Jim

              Comment


                #8
                If you are using your indicator and a strategy using the same code you would have the indicator set to CalculateOnBarClose=true, but the strategy to CalculateOnBarClose=false and then test for the condition on the close of the last bar with if(FirstTickOfBar). Then take the appropriate action.
                eDanny
                NinjaTrader Ecosystem Vendor - Integrity Traders

                Comment


                  #9
                  Thanks eDanny, that's the way to go.
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by trilliantrader, Today, 08:16 AM
                  2 responses
                  6 views
                  0 likes
                  Last Post trilliantrader  
                  Started by samish18, Today, 08:31 AM
                  1 response
                  1 view
                  0 likes
                  Last Post NinjaTrader_Clayton  
                  Started by Creamers, 09-08-2023, 10:26 AM
                  6 responses
                  157 views
                  0 likes
                  Last Post JonyGurt  
                  Started by funk10101, Today, 08:14 AM
                  1 response
                  2 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by bill2023, Yesterday, 08:51 AM
                  3 responses
                  22 views
                  0 likes
                  Last Post bltdavid  
                  Working...
                  X