Firetron’s UpdateOnInterval

2 557 Views 1 Comment 2 years ago
  • Calls a function on an interval, and remembers the previous result between the update intervals. Works the same as OptimizedForInterval/DefineIntervalOptimization, but with override feature.

    Custom Command Dependencies:
    None

    Test Script:

    local interval = 15
    local override = false
    
    local GetCurrentAsk = function ()
    
      return CurrentPrice().ask
    
    end
    
    local result = CC_UpdateOnInterval(GetCurrentAsk, interval, override)[1]
    
    Log(result)
    • This topic was modified 2 years, 5 months ago by Firetron. Reason: Changed description
    • This topic was modified 2 years, 5 months ago by Firetron. Reason: Changed description
    HaasScript Code
    Sign in or Register to download for free
  • HaasOnline Black Friday Sale Promotion Type: Sale Expires: December 7, 2023 24:00 UTC
    For a limited-time get up to 50% off monthly and 30% off annual plans.
  • Bybit
    • #2844
      Kolvir
      Basic
      Up
      0
      Down
      ::

      Getting:

      ERROR: Unknown references: OpenTime

      v4 script?

Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free