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
  • NewGuid
  • Parse
  • ParseCsv
  • ParseJson
  • StringContains
  • StringExplode
  • StringFromQuery
  • StringIndexOf
  • StringJoin
  • StringSplit
  • SubString

Was this helpful?

  1. Haasscript
  2. Commands
  3. Helpers

String Helpers

NewGuid

Creates an unique identifier.

Syntax: NewGuid()

Returns the unique identifier as string.

Return type: String

Parse

Converts the value to a specific type.

Syntax: Parse(value, type)

Returns the converted value or nil if parsing fails.

Return type: Dynamic

Parameter Name
Parameter Type
Required
Suggestions

value

Dynamic

True

type

Enum

True

NumberType,ListNumberType,BooleanType,StringType

ParseCsv

Parses CSV data string and returns it as an object. URLs are also supported.

Syntax: ParseCsv(csv, [ hasHeaders ], [ columnDelimiter ], [ rowDelimiter ])

Object containing the parsed information.

Return type: Dynamic

Parameter Name
Parameter Type
Required
Suggestions

csv

String

True

Text,Input,SessionGet,Load

hasHeaders

Boolean

False

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

columnDelimiter

String

False

Text,Input,SessionGet,Load

rowDelimiter

String

False

Text,Input,SessionGet,Load

ParseJson

Parses JSON data string and returns it as an object. URLs are also supported.

Syntax: ParseJson(json)

Object containing the parsed information.

Return type: Dynamic

Parameter Name
Parameter Type
Required
Suggestions

json

String

True

Text,Input,SessionGet,Load

StringContains

Returns a value indicating whether a specified substring occurs within this string.

Syntax: StringContains(value, searchValue, [ ignoreCase ])

Returns true if the specified substring occurs within this string.

Return type: Boolean

Parameter Name
Parameter Type
Required
Suggestions

value

String

True

Text,Input,SessionGet,Load

searchValue

String

True

Text,Input,SessionGet,Load

ignoreCase

Boolean

False

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

StringExplode

Splits a string into substrings that are based on the characters in an array.

Syntax: StringExplode(value, delimiter)

Returns an array of strings.

Return type: ListDynamic

Parameter Name
Parameter Type
Required
Suggestions

value

String

True

Text,Input,SessionGet,Load

delimiter

String

True

Text,Input,SessionGet,Load

StringFromQuery

Split a string on '&' and '='.

Syntax: StringFromQuery(value)

Returns an key-value based table.

Return type: ListDynamic

Parameter Name
Parameter Type
Required
Suggestions

value

String

True

Text,Input,SessionGet,Load

StringIndexOf

Gets the zero-based index of the first occurrence of the specified string in the current.

Syntax: StringIndexOf(value, searchValue, [ ignoreCase ])

Returns a zero-based index of the first occurrence of the specified string.

Return type: Number

Parameter Name
Parameter Type
Required
Suggestions

value

String

True

Text,Input,SessionGet,Load

searchValue

String

True

Text,Input,SessionGet,Load

ignoreCase

Boolean

False

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

StringJoin

Concatenates 2 string with an optional separator.

Syntax: StringJoin(value1, value2, [ separator ])

Returns the concatenated string.

Return type: String

Parameter Name
Parameter Type
Required
Suggestions

value1

Dynamic

True

Text,Number,Load,SessionGet

value2

Dynamic

True

Text,Number,Load,SessionGet

separator

String

False

Text,Input,SessionGet,Load

StringSplit

Splits a string into substrings that are based on the characters in an array.

Syntax: StringSplit(value, delimiter)

Returns an array of strings.

Return type: ListDynamic

Parameter Name
Parameter Type
Required
Suggestions

value

String

True

Text,Input,SessionGet,Load

delimiter

String

True

Text,Input,SessionGet,Load

SubString

Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.

Syntax: SubString(value, start, length)

Substring of the main value.

Return type: String

Parameter Name
Parameter Type
Required
Suggestions

value

String

True

Text,Input,SessionGet,Load

start

Number

True

Input,Number,SessionGet

length

Number

True

Input,Number,SessionGet

PreviousSignal HelpersNextMiscellaneous

Last updated 1 year ago

Was this helpful?