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 rocketman7, Today, 09:41 AM
                  4 responses
                  15 views
                  0 likes
                  Last Post rocketman7  
                  Started by selu72, Today, 02:01 PM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_Zachary  
                  Started by WHICKED, Today, 02:02 PM
                  2 responses
                  13 views
                  0 likes
                  Last Post WHICKED
                  by WHICKED
                   
                  Started by f.saeidi, Today, 12:14 PM
                  8 responses
                  21 views
                  0 likes
                  Last Post f.saeidi  
                  Started by Mikey_, 03-23-2024, 05:59 PM
                  3 responses
                  56 views
                  0 likes
                  Last Post Sam2515
                  by Sam2515
                   
                  Working...
                  X