YAML Section Reference

Use this page when the question is about the authored contract itself.

Written By AxiomCharts

Last updated About 2 hours ago

YAML Section Reference

Use this page when the question is about the authored contract itself.

This is the page for questions like:

  • which builder box should this rule live in?
  • which fields are required for this package type?
  • what happens if I leave this field out?
  • which defaults are safe to rely on, and which are better made explicit?
  • why is the strategy warning me even though the structure looked close?

This page is not trying to teach the whole strategy in one pass. Its job is narrower and more practical: help you author the sections correctly, understand what each field changes, and catch the mistakes that create quiet but misleading behavior.

If you want full example workflows, use Worked YAML Examples alongside this page. If your real question is about the expression language itself, use Expression Language Reference. If your real question is about available values, use Default Token Reference.

The Most Important Idea First

The strategy does not expect one giant YAML document.

It expects separate list snippets inside separate settings boxes.

That matters because many first-time authoring mistakes come from bringing a top-level document mindset into a settings panel that is already divided by side and by job.

The builder works more cleanly when you think of each box as:

  • one list
  • of one package family
  • on one direction

The Eight Authoring Boxes

The strategy separates authoring into eight text areas.

BoxPackage familyDirectionWhat belongs there
long setupssetupslonglong-side context windows
short setupssetupsshortshort-side context windows
long entriesentrieslonglong-side participation rules
short entriesentriesshortshort-side participation rules
long take profitsexitslonglong-side harvesting rules
short take profitsexitsshortshort-side harvesting rules
long stop lossesexitslonglong-side protection rules
short stop lossesexitsshortshort-side protection rules

How To Read A Package From Top To Bottom

When a package looks dense, read it in this order:

  1. the name tells you what this package is
  2. the ownership tells you what it belongs to
  3. the gate tells you whether it is even eligible
  4. the trigger or active condition tells you when it actually comes alive
  5. the behavior fields tell you how it will operate once live
  6. the scope and allocation fields tell you what share of the workflow it controls

That reading pattern helps because it mirrors the way the builder actually behaves. It also makes review much easier later when you return to an older configuration.

Structural Rules You Want To Get Right Early

Before any individual field matters, the package has to be shaped correctly.

RuleWhat it means in practiceWhy it matters
each box expects a list snippetdo not paste a full top-level section label into the boxthe box already is the section
each package begins as a list itemevery new setup, entry, take-profit leg, or stop-loss leg starts as its own itemthis is how the builder knows a new package began
field names must match the live contract exactlynear-miss names do not become valid automaticallysmall spelling drift creates real warnings or silent misunderstanding
expressions can be short or multilinethe builder supports both compact and more readable formatting stylesyou do not need to flatten everything into one line
comments are tolerated, but should stay disciplinedcomments can help, but too many of them make a dense package harder to readreadability is part of correctness here
blank lines are allowedvisual spacing is finespacing does not create new packages by itself
unknown fields warn rather than becoming usefulthe strategy may keep parsing, but the unknown field is still not part of the contracta warning is not permission

Two habits make YAML authoring much less fragile:

  • keep names exact
  • keep package intent obvious from the first few fields

What The Builder Validates Versus What You Still Need To Verify

This distinction matters.

Validation can confirm things like:

  • whether required fields are present
  • whether a field uses an accepted value family
  • whether ownership names point at something real
  • whether allocation and coverage budgets add up correctly
  • whether a required price field exists for the order type you chose

Validation does not confirm:

  • whether the trade idea is strong
  • whether the chart context is truly what you meant
  • whether a token is carrying a useful signal
  • whether the final management path matches your intention on a live chart

In other words, validation protects the contract. It does not replace observation.

Setup Packages

Setups define context.

This is where you decide whether a market condition is valid enough to create an operating window for the trade idea. A well-authored setup often makes the rest of the workflow dramatically easier to reason about because later rules can depend on a named context instead of repeating the same logic everywhere.

What a setup is responsible for

A setup can answer questions like:

  • when does this idea become active?
  • when should it stop being active?
  • does it need confirmation before it counts?
  • does cancellation also need confirmation?
  • should there be a cooldown before it can become valid again?
  • how many entries should be allowed inside one activation?

Setup field reference

FieldRequiredDefault if omittedWhat it controlsWhat to watch for
setup_nameyesnonethe identity of the setupit must be unique on that side
setup_gate_conditionnotruea broader eligibility filter around the setup pathuseful when the setup should be globally suppressed under certain conditions
setup_active_whenyesnonethe main condition that makes the setup livethis is the true heart of the setup
setup_cancel_whenconditionallyfalse when omittedthe condition that invalidates the setupat least one of cancel or reset behavior must exist
setup_reset_whenconditionallynonethe condition that re-arms the setup pathat least one of cancel or reset behavior must exist
setup_close_on_cancelnofalsewhether cancellation should also clean up related trade behavioruse only when you really want setup cancellation to have direct position consequences
setup_confirm_typenobar-count confirmationhow setup confirmation is measureduse deliberately rather than by habit
setup_confirm_countnozerohow much confirmation is required before the setup countshigher confirmation slows the setup and changes frequency
setup_cancel_confirm_typenobar-count confirmationhow setup cancellation is measuredmatters when you want cancellation to be more deliberate
setup_cancel_confirm_countnozerohow much confirmation cancellation requirescan keep a setup from flipping too fast
setup_cooldown_barsnozerohow long the setup stays unavailable after cancellation or completionuseful when you want to prevent immediate re-arming
setup_max_entries_per_activationnono fixed limithow many entries may occur within one activation windownegative or careless values can behave more restrictively than expected

How to author setups well

Strong setups are usually:

  • easy to explain in plain English
  • strict enough to create real context
  • simple enough that you can verify them visually

Weak setups usually fail in one of two directions:

  • they are so loose that later entries are doing all the real filtering
  • they are so specific that they become invisible except on a tiny slice of history

Common setup mistakes

MistakeWhat it causes
no clear invalidation paththe setup may stay live longer than you intended
too much confirmation too earlythe setup becomes slow and rare before you understand the base behavior
using setup logic for what really belongs in the entrycontext and participation get muddled together
forgetting cooldown existsthe setup seems inconsistent when it is actually obeying its own spacing rule

What to verify after authoring a setup

Before you move on to entries, verify:

  1. when the setup becomes active
  2. when it becomes confirmed
  3. when it cancels or resets
  4. whether any cooldown changes your expectations afterward

If those four things are not clear on the chart, it is too early to widen the workflow.

Entry Packages

Entries define participation.

This is where the workflow answers the question, "If the idea is valid, should the strategy get involved now, and in what form?"

The important word there is form.

An entry is not just a trigger. It also carries order behavior, ownership, allocation, price behavior, expiry, cancellation, and participation limits.

What an entry is responsible for

An entry can answer questions like:

  • which setup does this belong to?
  • what must be true before this entry is even eligible?
  • what makes the entry actually attempt participation?
  • what kind of order should it use?
  • how much of the entry budget does it control?
  • should its price freeze once armed or keep updating?
  • should it expire if it waits too long?
  • should it be allowed once or several times?

Entry field reference

FieldRequiredDefault if omittedWhat it controlsWhat to watch for
entry_nameyesnonethe identity of the entry packageit must be unique on that side
entry_belongs_to_setupnoglobal pathwhich setup owns the entryblank ownership does not mean "none"; it means global
entry_gate_conditionyesnonea required permission filter for the entryif this fails, the trigger never gets a chance
entry_trigger_whennotruethe event or state that actually causes the entry to actomitted trigger means the gate can carry most of the burden
entry_confirm_typenobar-count confirmationhow entry confirmation is measureduse intentionally; this changes timing
entry_confirm_countnozerohow much entry confirmation is requiredextra confirmation can filter noise or delay opportunity
entry_order_typeyesnonewhether the entry behaves as market, limit, stop, or stop-limitorder type changes real behavior, not just presentation
entry_allocation_percentyesnonehow much of the side-level entry budget this package controlsentry allocations must validate toward a full side budget
entry_lock_pricesnofalsewhether non-market entry prices freeze once armedimportant when you care about fixed versus monitored intent
entry_limit_priceconditionalnonethe live or armed limit pricerequired when the order type uses a limit path
entry_stop_priceconditionalnonethe live or armed stop pricerequired when the order type uses a stop path
entry_idnofalls back to the entry name for scopethe entry-group identity used by later targetingbe explicit when you plan to target exits carefully
entry_oca_groupnoblankoptional grouping behavior for working entriesuse carefully if your workflow depends on order coordination
entry_expire_after_barsnono forced expiryhow long a working non-market entry may remain activethis is the clearest place to author entry-level expiry
entry_cancel_whennononethe logic that invalidates a working entryespecially important for resting orders
entry_one_shotnotruewhether the entry should only take one attempteasy to forget later when wondering why re-entry never happened
entry_pyramiding_max_addsnono additional adds by defaulthow many extra adds are allowed beyond the initial participationuse non-negative values only

Order-type thinking for entries

Different order types are not cosmetic variations.

Order typeBest mental modelWhat to verify
marketparticipate as soon as permission and trigger aligndid the entry happen at the timing you expected?
limitwait at a chosen pricedid the order rest, fill, or expire the way you intended?
stopwait for a stop threshold to activatedoes the stop level make sense in live chart context?
stop-limituse a threshold plus a resting price pathdid you verify both price components, not just the trigger?

Common entry mistakes

MistakeWhat it causes
forgetting ownershipthe entry behaves through the global path instead of a named setup
focusing only on the triggergate, confirmation, price validity, and expiry still matter
treating order type as a small detailorder type can completely change how the same idea behaves
ignoring allocation totalsthe strategy will validate the side-level budget, and the workflow can fail if the budget is not coherent
forgetting one-shot behaviorreaders expect repeat participation from a package that was deliberately limited

What to verify after authoring an entry

Before you add more entries, verify:

  1. whether the owning setup is actually the one you intended
  2. whether the gate and trigger are doing different jobs or the same job twice
  3. whether the order type behaves as market, resting, or hybrid intent
  4. whether the entry stays active, expires, or cancels for reasons you can explain

Take-Profit Packages

Take profits define how the workflow harvests success.

That may sound straightforward, but it becomes one of the most important design surfaces in the whole builder once you begin using multiple legs, entry targeting, or moving price logic.

What a take-profit package is responsible for

A take-profit package can answer questions like:

  • should this management path apply broadly or to a specific entry group?
  • when is the profit-taking path even allowed to exist?
  • does it need a separate trigger before becoming active?
  • should it act as a market exit, a resting order, or a hybrid order path?
  • what share of the profit-taking budget does it control?
  • should the price freeze once armed or keep updating?

Take-profit field reference

FieldRequiredDefault if omittedWhat it controlsWhat to watch for
take_profit_nameyesnonethe identity of the take-profit packagenames must be unique across the direction's exit set
take_profit_belongs_to_setupnoglobal pathwhich setup owns the management pathblank means global behavior, not no ownership
take_profit_gate_conditionyesnonethe permission layer for the take-profit paththis should usually express when management is relevant
take_profit_trigger_whennotrue at runtimean extra trigger layer beyond the gateuseful when harvesting should wait for something specific
take_profit_confirm_typenobar-count confirmationhow profit-taking confirmation is measureduse when you want exits to be more deliberate
take_profit_confirm_countnozerohow much confirmation profit-taking requireshigher confirmation can delay harvesting
take_profit_order_typenolimitwhether the package exits as market, limit, stop, or stop-limittrailing behavior is not part of the current contract
take_profit_allocation_percentno100how much of the take-profit budget this leg controlsbe explicit once you begin using multiple legs
take_profit_limit_priceconditionalnonethe limit component of the profit-taking pathrequired when the chosen order type uses a limit path
take_profit_stop_priceconditionalnonethe stop component of the profit-taking pathrequired when the chosen order type uses a stop path
take_profit_cancel_whennononewhen the resting take-profit path should be invalidatedhas no real work to do on a pure market exit
take_profit_lock_pricesnofalsewhether non-market take-profit prices freeze when armedimportant when you want fixed versus monitored targets
take_profit_from_entry_idnobroad scopewhether this package targets a specific entry grouppowerful, but easy to misuse if you are fuzzy on scope

Designing take profits well

The cleanest take-profit designs usually make one thing obvious: what this leg is trying to do differently from the other legs.

Good differences might include:

  • early versus late harvesting
  • broad setup-owned behavior versus specific entry targeting
  • fixed target behavior versus dynamic target behavior

Weak differences usually look like accidental duplication. If two legs seem to be doing almost the same job, the chart often gets harder to read without the workflow getting any stronger.

Common take-profit mistakes

MistakeWhat it causes
leaving allocation implicit across multiple legscoverage becomes harder to reason about and easier to misread
targeting the wrong entry scopethe leg appears attached to the wrong trade context
using moving price logic without realizing itthe target seems to "wander" when monitored behavior was actually authored
treating a market take profit like a resting ordercancellation and price expectations become confused

What to verify after authoring a take-profit path

Verify:

  1. whether the leg is broad or entry-specific
  2. whether the order type matches your mental model
  3. whether the coverage share makes sense in the full ladder
  4. whether the price should stay fixed or update over time

Stop-Loss Packages

Stop losses define how the workflow constrains damage once participation exists.

They deserve just as much deliberate thought as take profits. In many workflows, the stop side is actually where trust is won or lost because it reveals whether the method has clear protection logic or only vague good intentions.

What a stop-loss package is responsible for

A stop-loss package can answer questions like:

  • when should protection become active?
  • should it be broad or tied to a specific entry group?
  • does protection need a separate trigger?
  • should protection live as market behavior, resting behavior, or a hybrid path?
  • what share of the stop-loss budget does this leg control?
  • should its working price stay fixed or keep adapting?

Stop-loss field reference

FieldRequiredDefault if omittedWhat it controlsWhat to watch for
stop_loss_nameyesnonethe identity of the stop-loss packagenames must stay unique across the direction's exit set
stop_loss_belongs_to_setupnoglobal pathwhich setup owns the protective pathblank ownership still means a real ownership choice
stop_loss_gate_conditionyesnonethe permission layer for the protective paththis usually expresses when protection is relevant
stop_loss_trigger_whennotrue at runtimean extra trigger layer for the stop pathuseful when protection should wait for something specific
stop_loss_cancel_whennononewhen a resting stop path should be invalidateddoes not have practical work to do on a pure market exit
stop_loss_confirm_typenobar-count confirmationhow stop-loss confirmation is measureduse with care because more confirmation changes urgency
stop_loss_confirm_countnozerohow much confirmation protective action requiresbe careful not to delay protection unintentionally
stop_loss_order_typenostopwhether the package exits as market, limit, stop, or stop-limittrailing behavior is handled through continued monitoring
stop_loss_allocation_percentno100how much of the stop-loss budget this leg controlsbe explicit once multiple legs exist
stop_loss_lock_pricesnofalsewhether non-market stop prices freeze once armedcentral when comparing fixed versus moving protective behavior
stop_loss_stop_priceconditionalnonethe stop component of the protective pathrequired when the order type uses a stop path
stop_loss_limit_priceconditionalnonethe limit component of the protective pathrequired when the order type uses a limit path
stop_loss_from_entry_idnobroad scopewhether this package protects a specific entry grouppowerful, but only if you are clear on what it is targeting

Designing stop losses well

A strong stop side usually makes three things clear:

  1. when protection becomes relevant
  2. how the protective path is expected to behave
  3. what share of the position each protective leg is actually responsible for

If any of those three is fuzzy, the chart will usually feel less trustworthy than it needs to.

Common stop-loss mistakes

MistakeWhat it causes
assuming the default stop behavior is enough without reviewprotection may exist, but not in the form you intended
adding confirmation without thinking through urgencythe stop can become slower than your risk model expects
using mixed scopes carelesslybroad and entry-specific protection get tangled together
forgetting allocation still matters on the stop sidecoverage can fail or become hard to explain

What to verify after authoring a stop-loss path

Verify:

  1. whether the stop path is broad or entry-specific
  2. whether the order type matches your risk intention
  3. whether any confirmation makes the stop less immediate than you expected
  4. whether the stop price should remain fixed or keep adapting

Validation Rules That Save The Most Time

Several validation rules are especially important because they catch high-impact structural mistakes early.

Validation themeWhat it protects
ownership names must point at something realprevents entries and exits from attaching to imaginary context
entry allocation must validate toward a full side budgetkeeps participation sizing coherent across the direction
take-profit coverage must validate within each scopekeeps harvesting ladders from becoming incomplete or contradictory
stop-loss coverage must validate within each scopekeeps protective ladders from becoming incomplete or contradictory
order-type requirements are enforcedprevents resting or hybrid orders from being authored without the prices they need
unsupported values are rejected or warnedkeeps near-miss fields from quietly becoming assumed behavior

When the strategy complains, start by asking which of those six themes the complaint belongs to. That usually gets you to the root faster than rereading the whole section.

Defaults Worth Using Carefully

Some defaults are helpful. Some should become explicit once your workflow grows.

Defaults that are usually reasonable for a first proof

  • setup gate as broadly available
  • entry trigger as broadly available when the gate already carries the logic
  • one-leg exit allocations at full coverage

Defaults you should stop leaning on once the workflow becomes serious

  • blank ownership when you really mean named ownership
  • omitted allocation in a multi-leg ladder
  • implicit scope when you really care which entry group a leg belongs to
  • vague or forgotten price-lock behavior on non-market orders

The general rule is simple: defaults are safest in small, readable examples. The more serious the workflow becomes, the more often explicit authorship is the clearer path.

The Fastest Way To Review A Package That Feels Wrong

When a package looks close but behaves badly, check it in this order:

  1. is it in the right section?
  2. is the name exact?
  3. is the ownership what you intended?
  4. is the gate doing one job and the trigger doing another?
  5. does the order type match the required price fields?
  6. does the scope and allocation make sense?

That order catches a surprising amount before you ever need deeper debugging.

Where To Go Next