Announcement

Collapse
No announcement yet.

Intraday ticks with SetComputeOnClose

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

  • Intraday ticks with SetComputeOnClose

    I have to run with setComputeOnClose(true) because of the amount of calculations done. Every now and then, but not on any regular interval, I need to check the high and low of the bar currently being formed.

    Can I concurrently run a very small script that does not use setComputeOnClose(true) and access it using efsExternal()? I haven't tried any experiments yet since I don't have a good programming strategy yet.

    Any thoughts would be appreciated.

  • #2
    AssetHound
    If you mean access it from the efs that is running with setComputeOnClose() then this would still execute one time only at the completion of the bar.
    Rather than using setComputeOnClose() you may want to consider enclosing all the logic that you want to execute only once per bar inside a BARSTATE_NEWBAR statement which would allow the other sections of code within that script to run on every tick
    Alex

    Comment


    • #3
      Ok. That would also solve another problem I have with loading an array using close(...) when switching between DWM and intraday -- since I could access data in the bar being formed. Essentially, the code is like this?

      if (getBarState() == BARSTATE_NEWBAR) {
      (...big code here...)
      }
      (...little code here...)
      return ...;

      So, the big code would only run on closed bars, while the little code would run on every tick -- assuming setComputeOnClose was not used. Thanks for the insight.
      -------------

      Originally posted by Alexis C. Montenegro
      AssetHound
      If you mean access it from the efs that is running with setComputeOnClose() then this would still execute one time only at the completion of the bar.
      Rather than using setComputeOnClose() you may want to consider enclosing all the logic that you want to execute only once per bar inside a BARSTATE_NEWBAR statement which would allow the other sections of code within that script to run on every tick
      Alex
      Last edited by AssetHound; 10-27-2006, 09:03 AM.

      Comment


      • #4
        AssetHound
        That is correct
        Alex

        Comment

        Working...
        X