Firetron’s UpdateOnInterval

2 429 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 1 year, 11 months ago by Firetron. Reason: Changed description
    • This topic was modified 1 year, 11 months ago by Firetron. Reason: Changed description
    HaasScript Code
    Sign in or Register to download for free
  • Earn Up to 2,000 $BMEX Tokens Promotion Type: contest Expires: July 31, 2023 Exclusive
    Fire up your trade bots and earn up to 2,000 $BMEX, $BTC, free subscriptions, and more.
    • #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