Documentation
  • Welcome
    • 🖥️Insilico Terminal
    • 🚀Terminal 3.8
    • ✍️Registration
    • 🔑Security
    • ❔Frequently Asked Questions
    • 🏛️Terms of Service
  • Setup
    • Creating an API Key
      • Creating a Bybit API Key
      • Creating a Bitmex API Key
      • Creating a Binance Key
      • Creating a Bitget API Key
      • Creating a Coinbase API Key
      • Creating an OKX API Key
      • Creating a BloFin API Key
    • Adding Hyperliquid
    • Adding your API Key to the Terminal
    • Progressive Web App (PWA) Guide
  • Application Elements
    • UI overview
    • Performance
    • Multi Mode
      • Multi Account
      • Multi Layout
      • Link System
      • Hotkeys
    • Classic Mode
    • Mobile Mode
    • Header controls
    • Interactive Chart
      • Designer
    • Tradingview Chart
    • Orderbook
    • Trades
    • Tickers / Instruments
    • Activity
    • Orders
    • Positions
    • DOM
    • PnL Cards
    • Aggr
    • Balances
    • Layouts
    • TradeStream Trading Journal
  • Execution panel
    • Side Panel Overview
    • “Size” Input / Slider bar
    • "Reduce" Switch
    • “TP/SL” Switch
    • Buy / Sell Buttons
    • Margin / Leverage Control
    • Instrument Statistics
  • Limit Tab
    • Limit
    • Stop Limit
    • Click Placement
    • Chase
    • Scale
    • Scale Side
  • Market
    • Market
    • Stop Market Order
    • Swarm
    • TWAP
  • Terminal CLI
    • Overview
    • 'Constant' values
    • User Defined Variables
    • General Commands
    • Simple Ordering
    • Stops
    • Ordering with Stops
    • Cancel Orders
    • Close Position
    • Scale Orders
    • Chase Orders
    • Swarm Order
    • Shortcut / Hotkeys
    • UI Control
  • Changelog
    • v3.8
    • v3.7
    • v3.6
    • v3.5
    • V3.4
    • v3.3.0
    • v3.1.15
    • v3.1.13
    • v3.1.11
    • v3.1.0
    • v3.0.0
    • v2.2.0
    • v2.1.0
    • v2.0.2
Powered by GitBook
On this page
  • How To Create & Modify Variables
  • Quick Editor
  • Using Variables in the CLI
  1. Terminal CLI

User Defined Variables

Previous'Constant' valuesNextGeneral Commands

Last updated 2 years ago

You can create variables and set them to any value then use them either manually by typing into the CLI or inside a shortcut binding.

All user variables start with the "@" symbol

This scheme offers a lot of flexibility and power if you're a regular shortcut user! For example you could define a variable @bigsize and use that in multiple shortcut bindings to Swarm, Chase etc. And then if you want to change the size used in these bindings, you can simply modify the value of @bigsize without having to re-write the bind shortcut.

How To Create & Modify Variables

Command
Description
Example

set @<name> <value>

Create a variable or change existing variable value

set @bigsize 1000$ set @halfsize 50% set @myentry -1%

unset @<name>

Remove a variable

unset @bigsize

unset all

Removes all variables

print @<name>

Shows current value of the variable

print @myentry

print all

Displays all variables and their current values

Variables work with any type of number or string. They can be used for size, price, the number of orders you want to place, the method of scale (cubic, linear).

Quick Editor

For fast editing, when you create your first variable you also enable the quick editor at the top of the Terminal window:

Using Variables in the CLI

It's very simple, here's a quick example:

set @mysize 100$     // set up our variables 
set @price -1%

buy @mysize at @price  // limit order
=> buy 100$ at -1%

chase sell @mysize to @price // chase all the way to -1% 
=> chase sell 100$ to -1%

set @price -0.1%       // modify and set more variables 
set @price2 -0.5%
set @numorders 10

scale buy @mysize into @numorders from @price to @price2
=> scale buy 500$ into 10 from -0.1% to -0.5%

// Combine 'Constants' with user variables:
buy @mysize   
sell @mysize at $entry // sell 100$ at your current entry price