Skip to content

Instantly share code, notes, and snippets.

@surrealist
Created February 26, 2026 18:55
Show Gist options
  • Select an option

  • Save surrealist/2ef6e0af601337faf822a99652f0545b to your computer and use it in GitHub Desktop.

Select an option

Save surrealist/2ef6e0af601337faf822a99652f0545b to your computer and use it in GitHub Desktop.
OptionsGo Order Text Syntax Guide — a complete reference for writing, organizing, and managing daily trading orders in OptionsGo (OG), from basic order types to keyboard shortcuts and exchange auto-paste.

OptionsGo Order Text Syntax Guide

Suthep Sangvirotjanaphat
27 Feb 2026

A complete reference for writing order text in OptionsGo (OG). Learn from the basics to advanced tricks.


Overview

Order text is a plain-text journal format for recording daily trades. Each "Today" slot contains one day's orders. After market close, Save & Clear moves today's text into the Portfolio (cumulative log) and resets today to a blank template.

The text is designed to be:

  • Human-readable — easy to understand at a glance
  • Editable by hand — just type
  • Auto-pasteable — paste HTML from the exchange and it formats itself
  • Portable — plain text is easy to copy, back up, and share

Part 1 — The Basics

1.1 Required Header (Today Slot)

Every Today slot must start with these two lines:

@date 26 Feb 2026
@index 900.0
Command Description
@date D MMM YYYY Today's date. Accepted formats: 26 Feb 2026, 26 Feb, Feb 26, 2026-02-26
@index 900.0 Futures index price used as the chart reference when Auto Fu is turned off

Note: OG will warn you if either line is missing when you click Save.


1.2 The 6 Order Types

Every order line starts with one of these two-letter codes:

Code Meaning Type
LF Long Futures Futures
SF Short Futures Futures
LC Long Call Options
LP Long Put Options
SC Short Call Options
SP Short Put Options

You can type the code in lowercase or mixed case — OG reformats it to uppercase when you save.


1.3 Order Line Format

Options (LC, LP, SC, SP) — has a strike price:

LC 1000 @5.5 x 2
LP 990 @11.8 x 1
SC 1050 @3.2 x 3
SP 950 @8.0 x 1

Format: TYPE STRIKE @PRICE x CONTRACTS

Futures (LF, SF) — no strike price:

LF @1015.0 x 1
SF @1020.5 x 2

Format: TYPE @PRICE x CONTRACTS

Strike validation: Strike prices must be multiples of 10 or 25 (e.g. 950, 975, 1000, 1010, 1025). OG will warn you if the strike is invalid.


1.4 Shorthand — Flexible Typing

OG is forgiving about spacing and symbols. You can omit @, x, and even the space after the order type. OG reformats the line correctly when you save.

LC 1070 5.5 1       → saved as:  LC 1070 @5.5 x 1
LC1070 5.5 2        → saved as:  LC 1070 @5.5 x 2
LF 950              → saved as:  LF @950.0 x 1
LF950               → saved as:  LF @950.0 x 1
  • For options, all three values (strike, price, contracts) are expected.
  • For futures, the contract count defaults to 1 if omitted.

1.5 Groups — Organizing Orders

Use @group to label a set of orders. Think of it as a section header.

@group TF
LF @1015.0 x 1

@group S50H26 (26 Feb 2026 11:54:23)
LP 990 @11.8 x 1
LP 990 @11.8 x 1
  • Everything after @group NAME (until the next @group or @date) belongs to that group.
  • The group name appears as a header in Summary view.
  • You can include timestamps or any text in the group name.

Shorthand: @. followed by a space and a name works the same as @group:

@. TF
LF @1015.0 x 1

Warning: The space after @. is required. @.TF (no space) is invalid.


1.6 Free Text / Notes

Any line that is not an @ command and not an order line is treated as a note for the current group.

@. TF
เติมทางขึ้น
LF @1015.0 x 1

Free text before the first @group becomes a note for the whole day:

@date 26 Feb 2026
@index 900.0

การเทรดวันนี้:
Fu is rising again. Follow the trend, but also add LP as a protective measure — because the market has a sense of humor.

@. TF
LF @1015.0 x 1

Free text appears as a description below the group name in Summary view.


1.7 Comments on Order Lines

Add -- (space, then two dashes) followed by any text at the end of an order line.

LF @1015.0 x 1 -- 51897728
LP 990 @11.8 x 1 -- 51892920
LP 990 @11.8 x 1 -- 51898054

The space before -- is required. Writing --51897728 without a leading space will not be recognized as a comment.

Comments appear in grey/muted text in the editor and Summary view.

Order numbers from the exchange: When you auto-paste from the exchange, OG can append the exchange order number as a -- comment automatically — if "Shows order number when pasted" is enabled in the Portfolio Settings page.


Part 2 — Intermediate

2.1 Disabling Orders — x prefix

Put x before an order line to disable it. The order is crossed out and excluded from the payoff chart, but still visible in the Summary.

@group TF
x LF @1015.0 x 1        ← disabled
LF @1020.0 x 1           ← active

Use this when you want to keep a record of an order but exclude it from analysis.


2.2 Disabling an Entire Group — x @group

Put x before @group to disable all orders in a group at once:

x @group Old hedge
LP 950 @6.0 x 2
SC 1050 @3.0 x 2

All orders in this group will be excluded from the payoff chart.


2.3 Hiding an Entire Group — - @group

Put - before @group to hide a group from the Summary list. The group's orders still count in the payoff chart — the group is just collapsed out of sight.

- @group Butterfly
LC 1050 @9.8 x 1 -- left wing
SC 1060 @7.4 x 2 -- body of BTF
LC 1070 @5.5 x 1 -- right wing

A hidden group shows a ghost icon (👻) in the Summary view. Click the ghost to toggle it back to visible.

Note: The - hide prefix only works on @group lines. It has no effect on individual order lines.


2.4 Disable + Hide — x- @group or -x @group

Combine both prefixes to disable all orders in a group AND hide it from the Summary:

x- @group Archived strategy
LP 950 @6.0 x 2

2.5 Chart Title — @title

Override the title displayed on the Today payoff chart:

@date 26 Feb 2026
@index 1015.0
@title My boring day

@. TF
LF @1015.0 x 1

The title appears in the chart header bar of the "Today" section.


2.6 Keyboard Shortcuts

Press ? anywhere outside a text field to open the shortcut help dialog.

Shortcut Action
Order Editor
Ctrl+Enter Save
Right Panel
Ctrl+Shift+S Switch to Summary tab
Ctrl+Shift+O Switch to Orders tab
Ctrl+Shift+P Switch to Portfolio tab
Ctrl+Shift+X Switch to Settings tab
Ctrl+Shift+↑ Previous day
Ctrl+Shift+↓ Next day
Left Panel
Ctrl+1 Show Strike Summary
Ctrl+2 Show Price Table
Ctrl+3 Show both
Ctrl+4 Show Speech panel
Price Table Modes
Ctrl+Shift+L Last price
Ctrl+Shift+B Bid-Offers
Ctrl+Shift+T Time Values
Ctrl+Shift+G Greeks
Help
? Show this shortcut list
Esc Close dialog

Most shortcuts are disabled while the cursor is inside a text field, except Ctrl+Enter (Save) which always works in the order editor.


Part 3 — Advanced

3.1 Auto-Paste from Exchange

Paste matched orders directly from the TFEX website into the order text area and OG formats them automatically.

Use case 1: Total Deal Summary page (today's orders)

This is the most common use. After trading, go to the Total Deal Summary page on the exchange website, copy the matched orders table, and paste it into the order text. OG groups orders by series and generates:

@group S50H26 (26 Feb 2026 11:54:23)
LP 990 @11.80 x 1 -- 51892920
LP 990 @11.80 x 1 -- 51898054
LF @1015.00 x 1 -- 51897728

Use case 2: Contract Notes page (previous dates)

If you missed recording a day or need to fix a past entry, use the Contract Notes page on the exchange website. Select a past date, copy the table, and paste it. OG parses each date and generates entries in the same format. This lets you reconstruct your trading history day by day.

The -- ORDER_NO suffix is appended when "Shows order number when pasted" is enabled in Portfolio Settings.


3.2 Order Generator — @gen

Generate a ladder of futures orders automatically:

@gen lf START STEP CONTRACTS COUNT
@gen sf START STEP CONTRACTS COUNT
Parameter Description
START Starting price (defaults to current @index if omitted)
STEP Price increment per level (can be negative)
CONTRACTS Number of contracts per level
COUNT Number of levels to generate

Examples:

@gen lf 800 2.5 3 10

Generates 10 LF levels starting at 800, each step +2.5, 3 contracts each:

@group lf 800 2.5 3 10
@index 800.0
LF @800.0 x 3
@index 802.5
LF @802.5 x 3
@index 805.0
LF @805.0 x 3
... (10 levels total)
@gen sf 1050 -2 1 5

Generates 5 SF levels starting at 1050, stepping down by 2 each level.


Part 4 — Workflow Reference

Default Template

When Today is empty, OG fills it with a default template:

@date 26 Feb 2026
@index 900.0

@group Today
x LF @900.0 x 0

The x LF @900.0 x 0 line is a dummy disabled order. It exists so the Summary page renders correctly when you have no real orders yet. Delete it once you have actual orders for the day.


Daily Workflow

Morning: Click Clear to reset the Today slot to the default template — it fills in today's date automatically. Update @index with the current futures price if Auto Fu is off. Write your trading plan or strategy notes as free text, then add a @group header for your first positions.

During the day: Add new @group sections as you execute trades. You can also paste directly from the TFEX Total Deal Summary page at any time — no need to type orders manually.

After market close: Click Save & Clear. OG appends today's text to the Portfolio log and resets Today to the blank template. You can then review the full history by clicking the Portfolio tab.


Slots Overview

Tab Purpose
Today Active daily trading journal
1, 2, 3, 4, 5 Experiment / what-if scenarios — full order text syntax, save independently
A Reserved (auto-sync, locked)
B Reserved (bot, locked)

Portfolio is not a slot — it is the cumulative trading log that grows each time you do Save & Clear. It can be viewed and edited via the Portfolio tab.


Quick Reference Card

# REQUIRED HEADER
@date 26 Feb 2026
@index 1015.0          ← used as chart reference when Auto Fu is off

# FREE TEXT (any non-@ non-order line = note for the current group)
Today's plan: follow the trend and hedge with LP.

# GROUPS
@group NAME            ← start a section
@. NAME                ← shorthand (space after . is required: "@. TF" not "@.TF")
x @group NAME          ← all orders in group disabled
- @group NAME          ← group hidden (ghost icon in Summary, click to show)
x- @group NAME         ← disabled + hidden

# ORDER LINES (full form)
LC 1000 @5.5 x 2       ← Long Call: strike 1000, price 5.5, 2 contracts
LP 990 @11.8 x 1       ← Long Put
SC 1050 @3.2 x 3       ← Short Call
SP 950 @8.0 x 1        ← Short Put
LF @1015.0 x 1         ← Long Futures (no strike)
SF @1020.0 x 2         ← Short Futures (no strike)

# ORDER LINES (shorthand — OG reformats on Save)
LC 1070 5.5 1          → LC 1070 @5.5 x 1
LC1070 5.5 2           → LC 1070 @5.5 x 2
LF 950                 → LF @950.0 x 1    (futures default to 1 contract)
LF950                  → LF @950.0 x 1

# ORDER PREFIX
x LC 1000 @5.5 x 2     ← disabled (excluded from payoff chart)

# INLINE COMMENT (space before -- is required)
LP 990 @11.8 x 1 -- 51892920

# CHART TITLE
@title My Strategy Name

# GENERATOR
@gen lf 800 2.5 3 10   ← LF ladder: start 800, step +2.5, 3 contracts, 10 levels
@gen sf 1050 -2 1 5    ← SF ladder: start 1050, step -2, 1 contract, 5 levels

# SAVE SHORTCUT
Ctrl+Enter             ← Save (works in both the editor and Monaco)

Complete Real-Life Example

@date 26 Feb 2026
@index 900.0

การเทรดวันนี้:
Fu is rising again. Follow the trend, but also add LP as a protective
measure — because the market has a sense of humor.

@. TF
เติมทางขึ้น
x LF @1015.0 x 1 -- aa

@group S50H26 (26 Feb 2026 11:54:23)
x LP 990 @11.8 x 1 -- 51892920
LP 990 @11.8 x 1 -- 51898054

- @group Butterfly
LC 1050 @9.8 x 1 -- left wing
SC 1060 @7.4 x 2 -- body of BTF
LC 1070 @5.5 x 1 -- right wing

What this produces in Summary view:

  • Date header with the day's note text
  • Group "TF" — note "เติมทางขึ้น", one disabled LF (crossed out with ✕)
  • Group "S50H26 (...)" — one disabled LP (✕) and one active LP (✓)
  • Group "Butterfly" — hidden, shown as a collapsed row with a ghost icon (👻); click to expand

The payoff chart shows the full position diagram with the "As of Today" cumulative view on top and the "Today only" view below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment