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 Brevo, Today, 01:45 AM
                0 responses
                3 views
                0 likes
                Last Post Brevo
                by Brevo
                 
                Started by aussugardefender, Today, 01:07 AM
                0 responses
                3 views
                0 likes
                Last Post aussugardefender  
                Started by pvincent, 06-23-2022, 12:53 PM
                14 responses
                239 views
                0 likes
                Last Post Nyman
                by Nyman
                 
                Started by TraderG23, 12-08-2023, 07:56 AM
                9 responses
                384 views
                1 like
                Last Post Gavini
                by Gavini
                 
                Started by oviejo, Today, 12:28 AM
                0 responses
                6 views
                0 likes
                Last Post oviejo
                by oviejo
                 
                Working...
                X