Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculateOnBarClose = true; but its not?

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

    CalculateOnBarClose = true; but its not?

    I have CalculateOnBarClose set to true in my strategy. My strategy calls a custom indicator

    if (LucyFiler(0).Plot0[0] == 3)
    {
    ExitShort(
    "Bail", "Entry1");
    ExitShort(
    "Bail", "Entry2");
    }

    Here is my boggle.... it appears to be launching LucyFiler as if my strategy's CalculateOnBarClose = false; I sware it's set to true. Do I need to set something in the indicator to true?

    Thank You
    Howie

    #2
    All indicators called from within a strategy will take the CalculateOnBarClose value from the strategy. Make sure that when you run the stratey, the strategy dialog "Calculate on bar close" parameter is really set to a value of true.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thank you Ray, I think the real problem is I have a short rountine I want to use as a subroutine but i don't know how to declare it so i used an indicator. Is there a reference for declaring our own subroutines. i'm not the best of programmers.
      Thanks,
      Howie

      Comment


        #4
        Yes, check the Help Guide for "User defined methods"
        RayNinjaTrader Customer Service

        Comment


          #5
          Thanks Ray that did the trick.

          Is this correct?
          1. Each Strategy that calls an indicator has its own set of data from that indicator (a separate instance)?

          2. Would the same be true of user defined methods? in other words there are separate instances for each strategy that calls the user defined method?
          My method holds a counter for each time called and i want to make sure there will be separate instances for each strategy that calls the method since the count is related to each separate instrument. I have the same strategy running on several different instruments.

          THANKS AGAIN!
          Howie

          Comment


            #6
            1) yes
            2) yes
            DierkNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jcbinks, Today, 03:32 PM
            2 responses
            14 views
            0 likes
            Last Post jcbinks
            by jcbinks
             
            Started by Stefan Mayer, Today, 03:09 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by M_ichel, Today, 03:18 PM
            1 response
            11 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by ralett, Today, 02:43 PM
            2 responses
            15 views
            0 likes
            Last Post ralett
            by ralett
             
            Started by Nightmaregpu, Today, 02:18 PM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X