Firetron’s UpdateOnInterval

2 382 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, 7 months ago by Firetron. Reason: Changed description
    • This topic was modified 1 year, 7 months ago by Firetron. Reason: Changed description
    HaasScript Code
    Sign in or Register to download for free
  • Mandala Trading Competition Promotion Type: contest Expires: June 9, 2023 Exclusive
    Trading volume competition, win up to $10,000 USDT and bounties.
  • Earn Up to 200 BMEX Tokens Promotion Type: contest Expires: March 31, 2023
    15 BMEX @ $20,000, 25 BMEX @ $50,000, 50 [email protected] $200,000, 100 BMEX @ $400,000, 200 BMEX @ $600,000 in monthly derivatives volume
    • #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