LogoLogo
Back to HaasOnline.comSwitch to Developer API
4.x
4.x
  • Welcome
  • TradeServer Cloud
    • Overview
    • Security
    • Troubleshooting
  • TradeServer Enterprise
    • Overview
    • Updates
    • Security
    • Installation
      • Windows
      • MacOS
      • Linux
    • Configuration
      • License Key
      • Login credentials
      • Hosting
        • Linux VPS Hosting
    • Special features
      • Price history
      • Backups
      • Machine Learning
        • Built-in Machine Learning
        • Custom Machine Learning
      • Scripted Exchange API (Coming Soon)
      • Local API (Coming Soon)
    • Troubleshooting
  • Interface
    • General Interface
      • Left Menu
      • Upper Right Items
        • Account data
        • Execute trade
        • AI Chatbots
          • Chatbot Julia
          • Chatbot David
          • Chatbot Thomas
        • Notifications
        • Menu
          • Exchange accounts
          • Settings
          • License information
          • Change Logs
          • Logout
      • Status bar
        • Price tickers
    • Dashboard
    • Bots
      • Bot management
      • Bot templates
    • HaasScript
      • Web Editor
      • Backtest Lab
        • Lab test setup
      • Backtest History
      • Manage Scripts
      • Manage Signals
    • Tools
      • Marketview
      • Market intelligence
      • Exchange profiler
      • Markets explorer
      • News
    • Finance
      • Portfolio
      • External Wallet
  • Haasscript
    • About
      • Change Log
    • Tutorials
      • Bot building
        • Trade-bot building
        • Visual bot building
        • Scripted bot building
      • Usage
        • HaasScript
          • Interval
          • Markets
          • Input Fields
          • Memory Management
          • Signal Handling
          • Position Information
          • Positions Handling
            • Fee correction
          • Order Handling
          • Trading
          • Charting
          • Optimizations
        • Visual Editor
          • Blocks
          • Parameters
          • Flow Control
          • Interaction
        • Script Editor
          • Classes
        • Managed Trading
        • Unmanaged Trading
    • Commands
      • Trade Bots
        • TradeBot Containers
        • Easy Indicators
        • Easy Safeties
        • Easy Insurances
      • Helpers
        • Array Helpers
        • Custom Command Helpers
        • Enumerations
        • Equations
        • Mathematical
        • Memory Helpers
        • Signal Helpers
        • String Helpers
        • Miscellaneous
        • Technical Analysis Helpers
      • Input data
        • Bot Settings
        • Input fields
        • Price Market Information
        • Script Settings
        • Time Information
        • Trade Market Information
      • Prices
      • Technical Analysis
      • Charting
      • Trading
        • Managed Trade Commands
        • Unmanaged Trade Commands
        • Order Information
        • Order Handeling
        • Position Information
        • Position Price Information
        • Profit Information
        • Wallet Information
      • Social Media
    • Built-in Bots
      • Version 3 bots
        • C# Scripted Bot
        • Email bot
        • Trendline Bot
        • Triangle Arbitrage Bot
      • Accumulation Bot
      • Enhanced RSI bot
      • FlashCrash (Grid) Bot
      • Crypto Index Bot
      • Intellibot Alice
      • Inter Exchange Arbitrage Bot
      • MadHatter Bot
      • Market Making Bot
      • Order Bot
      • PingPong Bot
      • Scalper bot
      • Zone-Recovery Bot
    • Community Bots
      • Simple Grid Bot (SPOT)
      • Simple Grid Bot (FUTURES)
      • Simple Market Maker (SPOT)
      • Simple Market Maker (FUTURES)
  • Usage
    • First Usage
    • Setup Exchange
      • Adding an API to the Platform
      • Binance
      • Binance US
      • Bit2me
      • Bitfinex
      • Bitget
      • BitMEX
      • ❌Bitpanda
      • Bitstamp
      • ❌Bittrex
      • Bybit
      • ❌Cex.IO (Legacy API)
      • ❌Coinbase
      • ❌Crypto.com
      • Deribit
      • Gemini
      • Gleec
      • ❌HitBTC
      • Huobi
      • ❌Ionomy
      • Kraken
      • Kraken Futures
      • KuCoin
      • KuCoin Futures
      • LBank
      • ❌OKCoin
      • OKX
      • OKX-Futures
      • OKX-Swap
      • Phemex
      • Poloniex
      • Poloniex Futures
      • WooX
    • Setup Telegram Notification Bot
    • Setup Discord Notification Bot
    • Use Signals
  • Other Resources
    • YouTube
    • Guides & Tutorials
    • Questions & Answers
    • Community Projects
  • Need Help?
    • Ask on Discord
    • Submit Support Ticket
Powered by GitBook
On this page
  • And
  • Compare
  • Equals
  • IfNull
  • IsBiggerAndSmallerThan
  • IsBiggerOrSmallerThan
  • IsBiggerThan
  • IsFalse
  • IsNotNull
  • IsNull
  • IsSmallerThan
  • IsTrue
  • Not
  • NotEquals
  • Or

Was this helpful?

  1. Haasscript
  2. Commands
  3. Helpers

Equations

And

Validates all values on being true.

Syntax: And(values[])

Returns true all values are true.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

values[]

BooleanParams

True

True,IsTrue,False,IsFalse,Or,Branch,Equals,IsBiggerThan,IsSmallerThan,IsBiggerOrSmallerThan,IsAnyOrderOpen,IsOrderFilled,IsOrderOpen,IsTradeAmountEnough

Compare

Checks if input1 is below, equal to or above input2.

Syntax: Compare(input1, input2)

Returns a list with booleans.

Return type: NumberOrTable

Parameter Name
Parameter Type
Required
Suggestions

input1

NumberOrTable

True

Input,Number

input2

NumberOrTable

True

Input,Number

Equals

Compares two values and returns whether or not the values are equal.

Syntax: Equals(value1, value2)

Returns true when the values are equal.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

value1

Dynamic

True

value2

Dynamic

True

IfNull

Sets the defaultValue if the value is nil.

Syntax: IfNull(value, defaultValue)

Returns the value of defaultValue when value is nil.

Return type: Dynamic

Parameter Name
Parameter Type
Required
Suggestions

value

Dynamic

True

Load

defaultValue

Dynamic

True

Load

IsBiggerAndSmallerThan

Checks if the value is bigger than lowValue and smaller then highValue.

Syntax: IsBiggerAndSmallerThan(value, lowValue, highValue)

Returns true the value is bigger than lowValue and smaller then highValue.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

value

NumberOrTable

True

lowValue

Number

True

Input,Number,SessionGet

highValue

Number

True

Input,Number,SessionGet

IsBiggerOrSmallerThan

Checks if the value is bigger than highValue or smaller then lowValue.

Syntax: IsBiggerOrSmallerThan(value, highValue, lowValue)

Returns true the value is bigger than highValue or smaller then lowValue.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

value

NumberOrTable

True

highValue

Number

True

Input,Number,SessionGet

lowValue

Number

True

Input,Number,SessionGet

IsBiggerThan

Checks if input1 is bigger than input2.

Syntax: IsBiggerThan(input1, input2)

Returns true input1 is bigger than input2.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

input1

NumberOrTable

True

input2

Number

True

Input,Number,SessionGet

IsFalse

Validates all values on being false.

Syntax: IsFalse(values[])

Returns true all values are false.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

values[]

BooleanParams

True

True,IsTrue,False,IsFalse,Or,Branch,Equals,IsBiggerThan,IsSmallerThan,IsBiggerOrSmallerThan,IsAnyOrderOpen,IsOrderFilled,IsOrderOpen,IsTradeAmountEnough

IsNotNull

Checks if the value is not null.

Syntax: IsNotNull(value)

Returns true if the value is not null.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

value

Dynamic

True

Load

IsNull

Checks if the value is null.

Syntax: IsNull(value)

Returns true if the value is null.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

value

Dynamic

True

Load

IsSmallerThan

Checks if input1 is smaller than input2.

Syntax: IsSmallerThan(input1, input2)

Returns true if input1 is smaller than input2.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

input1

NumberOrTable

True

input2

Number

True

Input,Number,SessionGet

IsTrue

Validates all values on being true.

Syntax: IsTrue(values[])

Returns true all values are true.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

values[]

BooleanParams

True

True,IsTrue,False,IsFalse,Or,Branch,Equals,IsBiggerThan,IsSmallerThan,IsBiggerOrSmallerThan,IsAnyOrderOpen,IsOrderFilled,IsOrderOpen,IsTradeAmountEnough

Not

Validates all values on being false.

Syntax: Not(values[])

Returns true all values are false.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

values[]

BooleanParams

True

True,IsTrue,False,IsFalse,Or,Branch,Equals,IsBiggerThan,IsSmallerThan,IsBiggerOrSmallerThan,IsAnyOrderOpen,IsOrderFilled,IsOrderOpen,IsTradeAmountEnough

NotEquals

Compares two values and returns whether or not the values are different.

Syntax: NotEquals(value1, value2)

Returns true when the values are not equal.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

value1

Dynamic

True

value2

Dynamic

True

Or

Validates if any of the values is true.

Syntax: Or(values[])

Returns true if any of the all values is true.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

values[]

BooleanParams

True

True,IsTrue,False,IsFalse,Or,Branch,Equals,IsBiggerThan,IsSmallerThan,IsBiggerOrSmallerThan,IsAnyOrderOpen,IsOrderFilled,IsOrderOpen,IsTradeAmountEnough

PreviousEnumerationsNextMathematical

Last updated 1 year ago

Was this helpful?