• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 johnnybegoode, Today, 11:35 AM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by NickyD, Today, 09:07 AM
            3 responses
            14 views
            0 likes
            Last Post NickyD
            by NickyD
             
            Started by 7robert, Today, 06:46 AM
            3 responses
            62 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by ElMagoR, Today, 07:49 AM
            4 responses
            31 views
            0 likes
            Last Post NinjaTrader_ChrisL  
            Started by Nabil, 09-13-2019, 11:44 AM
            5 responses
            35 views
            0 likes
            Last Post Nabil
            by Nabil
             
            Working...
            X