Firetron’s IsAnyPositionOpen

1 81 Views No Comments 2 months ago
  • Checks if the bot has any open positions.

    HaasScript Code
    --  ==========================================================================================================
    --    Firetron's IsAnyPositionOpen
    --
    --    Checks if the bot has any open positions.
    --
    --    Discord:  @FiretronP75
    --    BTC Tips: 14WLDZsrhshcP6qvBarKW8ABACv3iUXEro
    --    ETH Tips: 0xfaaac99fbf11f8f4abc4b3bf079cb2c7a43b5f87
    --  ==========================================================================================================
    
    --  ==============
    --    Definition
    --  ==============
    
    DefineCommand('IsAnyPositionOpen', 'Checks if the bot has any open positions.')
    
    --  ==========
    --    Output
    --  ==========
    
    local output = Count(GetAllOpenPositions()) > 0
    
    DefineOutput(BooleanType, output)
Login or Register to Comment

Unlock your crypto trading potential

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

Join for Free