Announcement

Collapse
No announcement yet.

setComputeOnClose & multiple intervals - when is main() called?

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

  • setComputeOnClose & multiple intervals - when is main() called?

    I understand that setComputeOnClose() is used to eliminate ticks and main() is only called for bar closes.

    But if I specify a study based on a different interval, especially one shorter than the chart interval, should I see bar closes for that shorter interval?

    As far as I can see I don't, which makes some of my processing a bit difficult. I had expected I would, especially because I could instead have a different symbol and interval, and would certainly expect to see the bar closes for that (the market is now closed so I can't test that easily).

    If I'm right, is this a bug, or by design? I can put together a short test script if that's useful to demonstrate the problem.

    Thanks

    Dave

  • #2
    Dave180,

    I believe that is by design. If you are trying to do any advanced coding, my recommendation is that you test for new bars coming in and not use setComputeOnClose. I have found that by imposing these restrictions up front, you end up making things more complex later on when trying to take advantage of more advanced features/functionality.

    Comment

    Working...
    X