Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cpu

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

    Cpu

    Hello,

    I use now variables for my stoplosses (eg an EMA or Donchian) and I want to ask if the value of the variable is calculated with every incoming tick and therefore CPU intensive.

    I don´t need with incoming tick. It´s OK with close of bar. Is there anything to add in the coding to avoid data update by tick so that there will not be problem with the ressources of the PC?

    Thanks
    Tony

    #2
    Tony, there is a strategy example that shows how to run some calculations once per bar and other calculations every tick.

    In your case, if you have CalculateOnBarClose set to false, it is calculating the value of a stop loss every tick but that would not count as computationally intensive. If COBC = true, then it is definitely not CPU intense.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thanks, where is the strategy example pls?

      Comment


        #4
        Sorry, the link is embedded in the text if you click any where in the section "how to run some calculations once per bar and other calculations every tick."

        I'll also paste it here - http://www.ninjatrader.com/support/f...ad.php?t=19387
        AustinNinjaTrader Customer Service

        Comment


          #5
          Austin, thank you for your reply. I have a question to the thread about variables and stoplosses yesterday. In the meantime I do stoplosses with variables and I can do with Donchian or Keltner....

          But I want to ask please how I can do so that my stoploss with the variable is realized only with close of bar. Eg now with my variable the stop is realized when price hits the Donchian but I want to have stoploss eg when close +2 ticks is below donchian lower.

          Thanks
          Tony

          Comment


            #6
            Tony, you would then need to setup a condition that monitors for this to happen and send an exit order then (ran in the CalculateOnBarClose = true) part.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Hello,

              of course this can be done with conditions and to send an exit order. But there occur overfills with NinjaTrader this way! Asking about overfills I get the information about risks of electronic trading. OK, no problem, I do it different. So the only thing to come to an end and to avoid some of these risks is how to bring this condition (eg close below ATR) in a stoploss.

              Best
              Tony

              Comment


                #8
                Closing this here as you started a new thread on this:
                Ryan M.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bortz, 11-06-2023, 08:04 AM
                47 responses
                1,610 views
                0 likes
                Last Post aligator  
                Started by jaybedreamin, Today, 05:56 PM
                0 responses
                9 views
                0 likes
                Last Post jaybedreamin  
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                19 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                6 views
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                16 views
                0 likes
                Last Post Javierw.ok  
                Working...
                X