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

Unlike statements

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

    #16
    Hi turbofib,

    It really depends on what you are trying to do.

    If you are trying to get a value at startup time that you want not to change then you should not put this in OnBarUpdate.

    If you are trying to call the value of an indicator on every bar then put this in OnBarUpdate.

    May I ask, what are you trying to accomplish?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #17
      i give you an example:
      analyzes the historical and call an indicator by passing different parameters to each bar in order to optimize
      Or call an indicator with different settings of the timeframe based on the volatility of the market

      Comment


        #18
        Originally posted by turbofib View Post
        i give you an example:
        analyzes the historical and call an indicator by passing different parameters to each bar in order to optimize
        Or call an indicator with different settings of the timeframe based on the volatility of the market
        Yes, that would mean you reinitialize whenever you want to change parameters. That would have to be in OBU. However, I do not understand what you are trying to do. How do you determine what to change the parameters to (when you talk of "to optimize"). Are you trying to optimize on the fly while the strategy is actually running?

        Optimization is done using the Strategy Analyzer, which handles changing values of public parameters in order to find the curve fitted optimal values. Why do you need to change parameters midstream?

        I guess I can understand changing parameters based on volatility.

        Comment


          #19
          yes but there are various ways to make the indicators ...
          I do not want to hand find the optimal parameters by optimizing the end .. but I want it that way by them is

          I and turbofib work together

          Comment


            #20
            is Correct!

            Comment


              #21
              Hi turbofib,

              If you are attempting to call an indicator using different parameters on each new bar, then yes you will want to put this in OnBarUpdate().
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by nandhumca, Yesterday, 03:41 PM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by The_Sec, Yesterday, 03:37 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by vecnopus, Today, 06:15 AM
              0 responses
              1 view
              0 likes
              Last Post vecnopus  
              Started by Aviram Y, Today, 05:29 AM
              0 responses
              5 views
              0 likes
              Last Post Aviram Y  
              Started by quantismo, 04-17-2024, 05:13 PM
              3 responses
              27 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X