Reference
Python reference
415 names in 18 modules
Statistics
184 definitions
Modules
All names
- actafunctionclassindicatorAccelerator oscillator: the Awesome oscillator minus its own ``signal_period`` average.
- accdisttafunctionclassindicatorAccumulation and distribution: a running total of volume weighted by the close's position.
- AddOnforgeclassAdd to a position that moved in its favour: ``fg.AddOn(every_pips=20, size_mult=0.5)``.
- adrtafunctionclassindicatorAverage daily range: the mean high to low range of the last ``days`` finished trading days.
- adxtafunctionclassindicatorThe ADX line of ``dmi``: how strong the trend is, whatever its direction.
- alertforgefunctionRaise an alert from ``on_bar``, or from ``calculate`` with ``bar=``.
- AlertConditionforgeclassOne condition an indicator can alert on: a label, the output that says when, a message.
- alldrawfunctionEvery live drawing, oldest first; ``kind`` keeps one kind (``"label"``, ``"box"``, ...).
- all_offorgefunctionTrue on a bar where every named condition is true.
- alligatortafunctionclassindicatorBill Williams' Alligator: ``jaw``, ``teeth`` and ``lips``.
- almatafunctionclassindicatorArnaud Legoux average: Gaussian weights over ``window`` bars.
- any_offorgefunctionTrue on a bar where at least one named condition is true.
- aotafunctionclassindicatorAwesome oscillator: the fast average of the median price minus the slow one.
- aroontafunctionclassindicatorAroon: how recently the highest high and the lowest low of the last ``period + 1`` bars came.
- ASIAsessionsconstant
- ASIA_KILLZONEsessionsconstant
- assert_entry_attestingfunctionAn entry was filled on primary bar ``bar``, on the ``side`` given when there is one.
- assert_exit_attestingfunctionAn exit was filled on primary bar ``bar``, closing a position of ``side`` and for ``reason``.
- assert_no_lookaheadtestingfunctionFail unless the look-ahead audit shows no evidence of look-ahead.
- assert_no_trade_betweentestingfunctionNo entry was filled from ``start`` to ``end``, both included.
- assert_ready_to_publishtestingfunctionFail unless every row of the pre-publish battery passes, naming each row that did not.
- assert_same_tradestestingfunctionThe two runs made the same trades, compared one by one in entry-time order.
- assert_stable_warmuptestingfunctionFail unless every output of the strategy is stable at its declared warm-up.
- atrtafunctionclassindicatorAverage true range, Wilder smoothed (``wilder``) or a simple mean (``sma``).
- BandforgeclassShade (or draw as bars) the space between two sides of one indicator.
- BAR_TYPESindicatorconstant
- barssincetafunctionHow many bars ago the condition last held: 0 on a bar where it holds.
- BASE_STYLESdrawconstant
- bbtafunctionindicatorBollinger Bands: a simple average with bands ``deviations`` population deviations away.
- bb_percenttafunctionindicatorBollinger Bands %B: ``(source - lower) / (upper - lower)``. No value where the bands meet.
- bbwtafunctionindicatorBollinger Bands width: ``(upper - lower) / middle``. No value where the middle is 0.
- bears_powertafunctionindicatorBears power: the bar's low minus an EMA of the closes.
- BearsPowertaclassThe bar's low against an EMA of closes.
- BestDaypropclassNo one day may be more than this share of the profit.
- BollingerBandstaclassA moving average with bands set by the standard deviation.
- BollingerPercentBtaclassWhere the price sits between the Bollinger Bands.
- BollingerWidthtaclassThe distance between the Bollinger Bands relative to the middle line.
- Boolparamclass
- boxdrawfunctionA rectangle between two bars and two prices, with optional text inside.
- BracketforgefunctionAn entry order with its stop and its target: ``fg.Bracket(entry, sl, tp)``.
- BREACHpropconstant
- BreakEvenforgeclassMove the stop to the entry price once the trade is ahead: ``fg.BreakEven(at_r=1.0)``.
- broker_factstestingfunctionThe ``oathra.broker_facts/1`` payload a run receives, for the sample ``symbols``.
- bulls_powertafunctionindicatorBulls power: the bar's high minus an EMA of the closes.
- BullsPowertaclassThe bar's high against an EMA of closes.
- bw_mfitafunctionindicatorMarket facilitation index: ``mfi = (high - low) / volume``, in price units.
- BWMFItaclassPrice range per unit of volume, with Bill Williams' four colours.
- cachedforgefunctionRemember a function's result for the rest of one sweep.
- CapsforgeclassThe most a strategy may hold or risk: ``fg.Caps(max_lots=2, max_positions=3)``.
- ccitafunctionclassindicatorCommodity channel index: distance from the average in units of mean deviation.
- chaikin_osctafunctionindicatorChaikin oscillator: the fast average of accumulation and distribution minus the slow one.
- ChaikinOscillatortaclassThe fast average of A/D minus its slow average.
- changetafunctionclassindicatorValue now minus the value ``period`` bars ago.
- chartdrawconstant
- check_api_levelforgefunctionReturn the declared level if Forge supports it, else raise ``ForgeApiError``.
- check_causality_exceptionsindicatorfunctionThe declared causality exceptions: output names to ``DECLARABLE_EXCEPTIONS``.
- check_data_declarationsindicatorfunctionThe checks that need the whole class. Raises ``ValueError`` with its rule id as prefix.
- check_lookaheadtestingfunctionAudit a strategy for look-ahead and return the report as plain JSON.
- check_output_declarationsindicatorfunctionThe checks that need the whole class: shift names and the price pane.
- check_repaintsindicatorfunction``repaints`` is ``True`` or ``False``; anything else is ``metadata_invalid``.
- check_timeframe_attributeindicatorfunctionThe class ``timeframe`` in C1's spelling, or a setting's name.
- check_warmuptestingfunctionMeasure how much each output of a strategy depends on where its data starts, as plain JSON.
- CheckResulttypesclassWhat the engine would say about an order sent now.
- Choiceparamclass
- cmotafunctionclassindicatorChande momentum oscillator: up moves against down moves over ``period`` bars, -100 to 100.
- colordrawconstantclass
- ColorparamclassDisplay only: a theme token (``theme.up``) or ``#rrggbb``. Never swept.
- ContextforgeclassThe point-in-time context every hook receives as ``ctx``.
- correlationtafunctionRolling correlation of two series over the last ``period`` bars, from -1 to 1.
- CountbarsfunctionOne bar for every ``n`` time bars of ``of``, like ``Count(3, "H1")``.
- countsignalsfunctionThe number of bars among this bar and the ``over - 1`` before it where the condition is true.
- crosstafunction1 on a bar where ``a`` crosses above ``b``, -1 where it crosses below, 0 elsewhere.
- crossovertafunctionTrue on the bar where ``a`` goes from at or below ``b`` to above it.
- crossundertafunctionTrue on the bar where ``a`` goes from at or above ``b`` to below it.
- cumtafunctionclassindicatorThe running total of the source from the first bar.
- DailyLosspropclassThe most the account may lose in a day: a percent or an amount, from the day's own start.
- dark_cloud_covertafunctionindicatorDark cloud cover: a fall that closes deep into the previous rise. Found: -1.
- DarkCloudCovertaclassA fall that closes deep into the previous rise.
- DASH_STYLESdrawconstant
- DataforgeclassAnother series an indicator reads: a timeframe, a symbol, a bar type or a price.
- DateRuledatesclassWhich days a scheduled method runs on.
- dayofweektafunctionThe weekday of ``t`` in ``tz``, Monday 0 to Sunday 6 (the engine clock's convention).
- DecimalparamclassA number with a fixed count of decimal places (02 LANG-085).
- DECLARABLE_EXCEPTIONSindicatorconstant
- DEFAULT_FILL_ALPHAdrawconstant
- DEFAULT_STYLE_BY_KINDdrawconstant
- delaytafunctionclassindicatorThe source ``n`` bars ago: ``value[i] = source[i - n]``.
- dematafunctionclassindicatorDouble exponential average: ``2 * EMA - EMA(EMA)``, the second stage seeded at bar
- demarkertafunctionclassindicatorDeMarker: pressure from higher highs against lower lows, from 0 to 1.
- describe_bandsindicatorfunctionOne manifest entry per band, in declaration order.
- describe_outputsindicatorfunctionOne manifest entry per output, in declaration order (all keys always present).
- describe_paramsforgefunctionEvery setting declared on ``cls`` and its bases, base settings first, in declaration order.
- dmitafunctionclassindicatorDirectional movement: ``plus_di``, ``minus_di`` and ``adx``.
- dojitafunctionclassindicatorDoji: a bar whose body is tiny against its range. Found: 1.
- donchiantafunctionclassindicatorDonchian channel: highest high and lowest low of the last ``period`` bars, and their mean.
- dragonfly_dojitafunctionindicatorDragonfly doji: a doji that opens and closes near its high. Found: 1.
- DragonflyDojitaclassA doji that opens and closes near its high.
- DrawingdrawclassA handle on one drawing. It can change or remove the drawing and shows nothing of it.
- DRAWING_KINDSdrawconstant
- DRAWINGS_PER_KINDdrawconstant
- efficiency_ratiotafunctionindicatorNet move over ``period`` bars divided by the path length.
- EfficiencyRatiotaclassHow directly the price moved: 1 for a straight line, near 0 for noise.
- ematafunctionclassindicatorExponential average: ``k = 2 / (period + 1)``, seeded with the first price.
- EndReasonforgeclassWhy a run ended, handed to ``on_end``.
- EngineNotInstalledtestingexceptionA check needs Forge's engine, and this installation does not include it.
- engulfingtafunctionclassindicatorEngulfing: a body that covers the previous opposite body. Found: 1 bullish, -1 bearish.
- EntryforgeclassHow entries are placed: ``fg.Entry.market``, ``limit``, ``stop`` or ``stop_limit``.
- EnumparamclassA dropdown over a Python ``enum.Enum``; the default is one of its members.
- envelopestafunctionclassindicatorA moving average with a band above and below it.
- evening_doji_startafunctionindicatorEvening doji star: an evening star whose middle bar is a doji. Found: -1.
- evening_startafunctionindicatorEvening star: a long rise, a small star, then a fall into the rise. Found: -1.
- EveningDojiStartaclassAn evening star whose middle bar is a doji.
- EveningStartaclassA long rise, a small star, then a fall into the rise.
- everyforgefunctionRun the method on a fixed interval: ``"15m"``, ``"4h"``, ``"1D"`` or ``"1W"``.
- every_daydatesfunctionEvery trading day, or every calendar day with ``trading=False``.
- ExitforgeclassThe ways to close trades together or by time: ``fg.Exit.basket``.
- EXTENDSdrawconstant
- fair_value_gapstafunctionindicatorThree-candle gaps, newest first in five slots per side, until price fills them.
- FairValueGapstaclassThree-candle imbalances, shown until price fills them.
- fallingtafunctionclassindicatorTrue when each of the last ``period`` bars is below the bar before it.
- FillCoststypesclassWhat one fill cost, each part in account currency and never negative as a cost.
- FillEventforgeclassOne fill: an entry, or a whole or partial exit.
- FillReasontypesconstant
- FilterforgeclassFilters for ``fg.Signals(filters=[...])`` and the class attribute ``filters``: where not to
- finddrawfunctionThe live drawing with this id, or ``None``.
- Floatparamclass
- FONTSdrawconstant
- forcetafunctionindicatorForce index: the volume times the change of a moving average of the price.
- ForceIndextaclassVolume times the change of a moving average of price.
- FORGE_API_LATESTforgeconstant
- ForgeApiErrorforgeexceptionA script's ``FORGE_API`` line is missing, malformed or unsupported.
- FORMATSindicatorconstant
- fractalstafunctionclassindicatorWilliams fractals: ``up`` (swing high) and ``down`` (swing low), written two bars late.
- framatafunctionclassindicatorFractal adaptive average of the close (Ehlers).
- gatortafunctionclassindicatorGator oscillator: the gaps between the Alligator's lines, above and below 0.
- getsessionsfunctionThe preset called ``name``, in any case. A name Forge does not have names the nearest one.
- gradientdrawfunctionThe colour between ``c1`` (at ``lo``) and ``c2`` (at ``hi``) for ``value``.
- gravestone_dojitafunctionindicatorGravestone doji: a doji that opens and closes near its low. Found: 1.
- GravestoneDojitaclassA doji that opens and closes near its low.
- hammertafunctionclassindicatorHammer: a long lower wick after a fall. Found: 1.
- hanging_mantafunctionindicatorHanging man: a long lower wick after a rise. Found: -1.
- HangingMantaclassA long lower wick after a rise.
- haramitafunctionclassindicatorHarami: a small body inside the previous long body. Found: 1 after a fall, -1 after a rise.
- heikin_ashitafunctionindicatorHeikin-Ashi candles: ``ha_open``, ``ha_high``, ``ha_low`` and ``ha_close``.
- HeikinAshibarsfunctionHeikin-Ashi bars over time bars.
- HeikinAshitaclassSmoothed candles that make trends easier to read.
- highestseriesfunctionThe highest of the last ``window`` values ending at each bar.
- highesttafunctionclassindicatorThe highest value of the last ``period`` bars, the current bar included.
- highest_barstafunctionindicatorHow many bars ago the highest value of the last ``period`` bars was, 0 for the current bar.
- HighestBarstaclassHow many bars ago the highest value of the window was.
- hlinedrawfunctionA horizontal line across the whole chart at ``price``.
- hmatafunctionclassindicatorHull average: ``wma(2 * wma(x, half) - wma(x, period), root)``.
- hourtafunctionThe hour (0 to 23) of nanosecond UTC times ``t`` in the zone ``tz``.
- ichimokutafunctionclassindicatorTenkan, kijun, senkou A and B, and chikou, undisplaced.
- IndicatorforgeclassThe one base class of an indicator (IND-001: declared by subclassing, never inferred).
- inside_bartafunctionindicatorInside bar: a bar whose range sits within the previous bar's range. Found: 1.
- InsideBartaclassA bar whose range sits within the previous bar's range.
- instrumenttestingfunctionA copy of the sample facts of ``symbol``: ``EURUSD``, ``GBPUSD``, ``USDJPY``, ``US500`` or
- INSTRUMENT_CLASSEStestingconstant
- Intparamclass
- IntentforgeclassWhat ``confirm_entry``, ``confirm_exit`` and ``size`` receive: a trade about to happen.
- InvalidParamsforgeexceptionRaise it in setup(self, ctx) to reject this combination of settings.
- inverted_hammertafunctionindicatorInverted hammer: a long upper wick after a fall. Found: 1.
- InvertedHammertaclassA long upper wick after a fall.
- isnaforgefunctionTrue where a value is missing: ``None`` or ``NaN``.
- jitjitfunctionCompile a plain function over arrays and numbers with numba.
- KagibarsfunctionKagi lines that reverse after a move of ``reversal`` in ``unit`` (default pips).
- kamatafunctionclassindicatorKaufman adaptive average.
- kctafunctionindicatorKeltner channel: an EMA of closes with bands ``atr_factor`` average true ranges away.
- kcwtafunctionindicatorKeltner channel width: ``(upper - lower) / middle``. No value where the middle is 0.
- KeltnertaclassAn EMA with bands set by the average true range.
- KeltnerWidthtaclassThe distance between the Keltner bands relative to the middle line.
- killzonestafunctionclassindicatorFour named windows, each true on the bars that open inside it.
- labeldrawfunctionWrite ``text`` on the chart at a price (``where="at_price"``) or on a bar.
- LABEL_SIZESdrawconstant
- leveldrawfunctionA horizontal line from ``start`` that stops at the first bar whose range reaches it.
- LevelforgeclassA horizontal line in the indicator's pane: ``fg.Level(70, "Overbought")``.
- linedrawfunctionA straight line between two points (each needs a price); ``extend`` makes it a ray.
- LINE_DASHESdrawconstant
- LineBreakbarsfunctionLine break bars that look back ``lines`` lines (default 3).
- linregtafunctionclassindicatorThe regression line at the newest bar of the window: ``a + b * (period - 1)``.
- linreg_intercepttafunctionindicatorThe regression line at the oldest bar of the window.
- linreg_slopetafunctionindicatorThe slope of the regression line: its change per bar.
- LinRegIntercepttaclassWhere the fitted line starts, at the oldest bar of the window.
- LinRegSlopetaclassHow much the fitted line rises or falls per bar.
- liquiditytafunctionclassindicatorEqual highs and lows, resting liquidity above swing highs and below swing lows, and sweeps.
- LIVE_CADENCESindicatorconstant
- loadforgefunctionRun a ``.py`` file's top level, check it and return the checked ``Program``.
- log_returntafunctionindicatorThe natural log of the value over the previous value: ``ln(source[i] / source[i-1])``.
- LogReturntaclassThe natural log of the value over the previous value.
- LONDONsessionsconstant
- LONDON_CLOSE_KILLZONEsessionsconstant
- LONDON_KILLZONEsessionsconstant
- lowestseriesfunctionThe lowest of the last ``window`` values ending at each bar.
- lowesttafunctionclassindicatorThe lowest value of the last ``period`` bars, the current bar included.
- lowest_barstafunctionindicatorHow many bars ago the lowest value of the last ``period`` bars was, 0 for the current bar.
- LowestBarstaclassHow many bars ago the lowest value of the window was.
- lwmatafunctionLinearly weighted average: weight ``period`` on the newest value down to 1 on the oldest.
- matafunctionclassindicatorThe moving average named by ``method``: one of sma, ema, smma, lwma, wma, hma, dema, tema.
- MA_METHODSparamconstant
- macdtafunctionclassindicatorMACD: the fast EMA minus the slow EMA, its signal line and the gap between them.
- make_styledrawfunctionCheck a style against the vocabulary and fill the defaults. Every refusal is a sentence.
- MaMethodparamclassA moving-average method dropdown (04 IND-044).
- MANIFEST_SCHEMAindicatorconstant
- MARKER_SHAPESdrawconstant
- MARKER_WHEREdrawconstant
- market_structuretafunctionindicatorSwings labelled HH, HL, LH and LL, with breaks of structure and changes of character.
- MarketStructuretaclassConfirmed swings labelled HH, HL, LH and LL, with breaks of structure (BOS) and changes of character (CHoCH), for internal and swing structure.
- marubozutafunctionclassindicatorMarubozu: a bar with almost no wicks. Found: 1 on a rising bar, -1 on a falling bar.
- MAX_CANDIDATESparamconstant
- MAX_FUTURE_BARSdrawconstant
- MAX_SHIFTdrawconstant
- MAX_TEXTdrawconstant
- MAX_WIDTHdrawconstant
- max2tafunctionThe larger of two series bar by bar, or of a series and a number.
- MaxLosspropclassThe most the account may lose in all: static, or trailing behind the balance or the
- MaxRequestspropclassAt most this many requests to the broker in a day.
- mediantafunctionclassindicatorMedian of the last ``period`` values. NaN where the window holds a missing value.
- MetaforgeclassWhat a strategy is called and how it is found: a title, a short code, an author and tags.
- mfitafunctionclassindicatorMoney flow index: RSI built from the typical price times volume, from 0 to 100.
- midpointtafunctionclassindicatorHalfway between the highest and the lowest value of the last ``period`` bars.
- midpricetafunctionclassindicatorHalfway between the highest high and the lowest low of the last ``period`` bars.
- min2tafunctionThe smaller of two series bar by bar, or of a series and a number.
- momtafunctionindicatorPrice now against price ``period`` bars ago.
- MomentumtaclassPrice now against price a number of bars ago.
- monthtafunctionThe month (1 to 12) of ``t`` in ``tz``.
- month_enddatesfunctionThe last day of each month.
- month_startdatesfunctionThe first day of each month.
- morning_doji_startafunctionindicatorMorning doji star: a morning star whose middle bar is a doji. Found: 1.
- morning_startafunctionindicatorMorning star: a long fall, a small star, then a rise into the fall. Found: 1.
- MorningDojiStartaclassA morning star whose middle bar is a doji.
- MorningStartaclassA long fall, a small star, then a rise into the fall.
- n_ofsignalsfunctionTrue on a bar where at least ``k`` of the named conditions are true.
- NAMED_COLORSdrawconstant
- NO_SHIFT_STYLESdrawconstant
- NoFloorAsStoppropclassNever use the account's loss floor as the stop.
- NoHedgingpropclassNo opposite positions on one instrument at once.
- NoMartingalepropclassNo sizing that doubles up after a loss.
- none_ofsignalsfunctionTrue on a bar where none of the named conditions is true.
- NoNewspropclassDo not hold trades through the news window around a release.
- NoNewsBracketspropclassNo pending orders placed around a news release.
- NoOvernightpropclassNo trade open overnight.
- normalize_timeframeindicatorfunctionA timeframe in C1's spelling: ``M7``, ``H4``, ``D1``, ``W1``, ``MN1``.
- NoWeekendHoldpropclassNo trade open over the weekend.
- NYsessionsconstant
- NY_KILLZONEsessionsconstant
- nzforgefunctionReplace a missing value with ``value`` (default 0).
- obvtafunctionclassindicatorOn-balance volume: a running total that starts with the first bar's volume.
- onforgefunctionRun the method on the days a date rule names, like ``fg.dates.month_end()``.
- ON_BREACHpropconstant
- on_datesdatesfunctionSpecific dates, as ISO text like ``"2026-10-01"`` or ``datetime.date`` values.
- opening_rangetafunctionindicatorThe high and low of the first minutes of a session, and the closes that cross them.
- OpeningRangetaclassThe high and low of the first minutes of a session, with breakout signals.
- OrderforgeclassThe orders ``ctx.order`` takes: ``fg.Order.market``, ``limit``, ``stop`` and ``stop_limit``.
- order_blockstafunctionindicatorThe last opposite candle before each break of structure, kept until price goes through it.
- OrderBlockstaclassThe last opposite candle before a break of structure, kept until price trades back through it.
- OrderEventtypesclassWhat ``on_order_event`` receives: one thing that happened to one order.
- OrderRequesttypesclassAn order a strategy describes before sending it: what ``ctx.check`` and ``calc.margin`` take.
- OrderSidetypesconstant
- OrderStatusforgeclassWhere an order is in its life. ``PARTIAL`` is reserved for partial fills, which no order
- OrderTicketforgeclassAn order a strategy sent. Read its state, and change or cancel it while it is working.
- OrderTypetypesconstant
- osmatafunctionclassindicatorOsMA: the MACD line minus its signal line.
- OutputforgeclassOutput declarations. Each takes a label; the name is the attribute it is assigned to.
- OUTPUT_KINDSdrawconstant
- output_stylesindicatorfunctionEvery output's style with its default colour filled in.
- outside_bartafunctionindicatorOutside bar: a bar whose range covers the previous bar's range. Found: 1.
- OutsideBartaclassA bar whose range covers the previous bar's range.
- ParamforgeclassBase of every setting declaration. ``default`` is the only positional argument.
- ParamErrorforgeexceptionA setting declaration, or a value given for one, is invalid.
- parse_colordrawfunctionA colour from a ``Color`` or one of its written forms; anything else is a ``ValueError``.
- percentranktafunctionclassindicatorThe share of the previous ``period`` values at or below the current value.
- period_opentafunctionindicatorThe open of the current day, week or month on every bar of it.
- PeriodOpentaclassThe opening price of the current day, week or month.
- PhasepropclassOne phase of an evaluation: a profit target, with the days it needs.
- piercingtafunctionclassindicatorPiercing line: a rise that closes deep into the previous fall. Found: 1.
- pivot_hightafunctionindicatorThe high of a swing high, written ``right`` bars after the swing.
- pivot_lowtafunctionindicatorThe low of a swing low, written ``right`` bars after the swing (the mirror of pivot_high).
- pivot_pointstafunctionindicatorPivot points for ``kind`` from the previous ``period`` (``D``, ``W`` or ``M``).
- PivotHightaclassA swing high, shown once enough bars after it prove it was the highest.
- PivotLowtaclassA swing low, shown once enough bars after it prove it was the lowest.
- PivotPointstaclassSupport and resistance levels projected from the previous day, week or month.
- PlotforgeclassA named series for ``fg.Signals(plots=...)`` with a style and a pane.
- PLOT_STYLESdrawconstant
- PlotStyledrawclassHow one output is drawn. Colours are held as wire strings.
- PointdrawclassA place on the chart: a bar (``bar=12``) or a time (``time=ns``), and a price.
- PointFigurebarsfunctionPoint and figure columns. ``box`` is a size, an ATR or percent box, or "traditional".
- PositionforgeclassAn open position. Read it, and move its stop and target, close it or reverse it.
- PositionOwnertypesclassWhat a position calls to change or close itself. The run implements it.
- PositionRecordtypesclassThe mutable state behind a ``Position``. The run writes it; a strategy never sees it.
- PositionSidetypesconstant
- premium_discounttafunctionindicatorThe upper and lower halves of the active swing range, split at equilibrium.
- PremiumDiscounttaclassThe upper and lower halves of the active swing range, split at equilibrium.
- presetpropfunctionclassA named firm's rules from Forge's library, like ``fg.prop.preset("ftmo-2step",
- PRESETSsessionsconstant
- PriceparamclassA price level, draggable on the Studio chart. ``None`` means unset.
- prior_levelstafunctionindicatorThe previous day's, week's or month's open, high, low and close on every bar.
- PriorLevelstaclassThe previous day, week or month open, high, low and close (PDH, PDL), carried forward.
- publish_checktestingfunctionRun the pre-publish battery on a strategy file and return its report as plain JSON.
- QuotetypesclassThe bid, ask and spread at the decision time, in price units.
- RangebarsfunctionRange bars: a bar closes when its high to low range reaches ``size`` in ``unit``.
- RegionforgeclassA stretch of bars to shade on the chart: ``fg.Region(start, end, label="news")``.
- RejectReasonforgeclassWhy an order was refused. One member per engine refusal name, bar block then order block.
- RenkobarsfunctionRenko bricks. ``box`` is the brick size in ``unit`` (default pips), or an ATR or percent box.
- requirestrategyfunctionStop the run with ``message`` unless ``condition`` is true.
- RequirementFailedstrategyexceptionA condition the strategy requires was false. It stops the run at the line of
- RequiresforgeclassThe account behaviour a strategy needs: ``account = fg.Requires(hedging=True)``.
- RequireStoppropclassEvery trade carries a stop.
- rgbdrawfunctionA fixed colour from red, green and blue (0 to 255) and an optional alpha (0 to 1).
- risingtafunctionclassindicatorTrue when each of the last ``period`` bars is above the bar before it.
- rmatafunctionclassindicatorWilder's smoothed average: seeded with the mean of the first ``period`` values.
- roctafunctionclassindicatorChange over ``period`` bars, as a percent, a fraction or a ratio.
- rollingseriesfunctionThe ``how`` of the last ``window`` values ending at each bar, NaN until ``window`` values
- rsitafunctionclassindicatorRelative strength index from average gains against average losses, 0 to 100.
- RulespropclassCustom prop-firm rules, as the class attribute ``prop = fg.prop.Rules(...)``.
- runforgefunctionRun a strategy file over a data frame, the way a hosted run does.
- runtestingfunctionRun a strategy over sample bars and return what it did.
- RunModeforgeclassHow the run was started. Readable from a strategy and never a behaviour switch.
- rvitafunctionclassindicatorRelative vigor index: the close against the open, scaled by the range, with a signal line.
- SampleBarstestingclassA set of bars for tests, with the facts of the instrument they imitate.
- sartafunctionclassindicatorParabolic stop and reverse.
- ScalingpropclassA table of the lots the account may trade as its balance grows.
- SERIES_TOKENSdrawconstant
- SessionparamclassA time window like ``"07:00-10:00"``; several are comma separated.
- session_rangetafunctionindicatorThe Asia, London and New York sessions: a box while each runs, its levels once it ends.
- SessionPresetsessionsclassA named window of hours in a time zone, or a symbol's own venue session.
- SessionRangetaclassThe high and low of the Asia, London and New York sessions, boxed while each runs.
- shiftseriesfunction``x`` moved ``n`` bars later, so the value at bar ``i`` is ``x[i - n]``.
- shooting_startafunctionindicatorShooting star: a long upper wick after a rise. Found: -1.
- ShootingStartaclassA long upper wick after a rise.
- SHOW_TARGETSdrawconstant
- SignalsforgeclassWhat ``compute()`` returns: entry and exit conditions, and named series to plot or record.
- SizeforgeclassHow much each entry trades. Build one with a constructor, like ``fg.Size.risk_pct(1.0)``.
- smatafunctionclassindicatorMean of the last ``period`` values, each window summed from scratch.
- smmatafunctionWilder's smoothed average: seeded with the mean of the first ``period`` values.
- snapshottestingfunctionCompare a run, or a mapping of numbers, with the snapshot stored for this test.
- SourceparamclassA price field (``close``, ``hl2``...) or another indicator's output.
- spinning_toptafunctionindicatorSpinning top: a small body with a longer wick on each side.
- SpinningToptaclassA small body with a longer wick on each side.
- stable_fieldstestingfunctionThe fields a run's snapshot keeps, by section, in the order the snapshot writes them.
- STABLE_TRADE_FIELDStestingconstant
- StdDevtaclassHow far values spread around their average over a period.
- stdevtafunctionindicatorStandard deviation of the last ``period`` values around their moving average at this bar.
- stochtafunctionindicatorStochastic oscillator: ``k`` is the slowed %K and ``d`` its simple average.
- stoch_rsitafunctionindicatorThe stochastic oscillator applied to the relative strength index.
- StochastictaclassWhere the close sits in the recent high to low range, with a signal line.
- StochRSItaclassThe stochastic oscillator applied to RSI.
- StopforgeclassWhere a losing trade is closed. Build one with a constructor, like ``fg.Stop.atr(2.0)``.
- StrategyforgeclassOne strategy class per file, with ``FORGE_API = 1`` at the top of the file.
- STYLES_BY_KINDdrawconstant
- sumtafunctionclassindicatorThe sum of the last ``period`` values. A window that holds a missing value has no value.
- supertrendtafunctionclassindicatorSuperTrend: a line ``factor`` average true ranges from the bar's midpoint that only ratchets.
- SUPPORTED_API_LEVELSforgeconstant
- SymbolparamclassA symbol; ``None`` means the run's own symbol. Never swept.
- synthetictestingfunctionA seeded synthetic sample. ``seed`` has no default: an unseeded call is a ``TypeError``.
- TargetforgeclassWhere a winning trade is closed. Build one with a constructor, like ``fg.Target.r(2.0)``.
- TargetsforgeclassSeveral targets that each close a part of the trade: ``fg.Targets([(0.5, t1), (0.5, t2)])``.
- tematafunctionclassindicatorTriple exponential average: ``3 * E1 - 3 * E2 + E3``. After a gap the cascade restarts.
- TestRuntestingclassOne finished run in a test.
- TextparamclassDisplay only: a short text. Never swept.
- TEXT_ALIGNdrawconstant
- THEME_TOKENSdrawconstant
- thensignalsfunctionTrue where ``second`` becomes true, if ``first`` became true 1 to ``within`` bars earlier.
- three_black_crowstafunctionindicatorThree black crows: three falling bars, each opening inside the last body. Found: -1.
- three_insidetafunctionindicatorThree inside: a harami confirmed by the third bar. Found: 1 up, -1 down.
- three_outsidetafunctionindicatorThree outside: an engulfing confirmed by the third bar. Found: 1 up, -1 down.
- three_white_soldierstafunctionindicatorThree white soldiers: three rising bars, each opening inside the last body. Found: 1.
- ThreeBlackCrowstaclassThree falling bars, each opening inside the last body.
- ThreeInsidetaclassA harami confirmed by the third bar.
- ThreeOutsidetaclassAn engulfing confirmed by the third bar.
- ThreeWhiteSoldierstaclassThree rising bars, each opening inside the last body.
- TickbarsfunctionOne bar for every ``n`` ticks.
- TicketOwnertypesclassWhat an order ticket calls to change or cancel itself. The run implements it.
- TicketRecordtypesclassThe mutable state behind an ``OrderTicket``. The run writes it; a strategy never sees it.
- TimebarsfunctionTime bars: one bar per period, like ``Time("H1")``.
- TimeparamclassA clock time like ``"16:55"``.
- TIME_AXIS_KINDSdrawconstant
- Timeframeparamclass
- timeframe_nsindicatorfunctionThe length of a C1 timeframe in nanoseconds, or ``None`` for a month (no fixed length).
- timestamptafunctionNanoseconds UTC of a local time in ``tz``.
- TimeStopforgeclassClose a trade that has been open too long: ``fg.TimeStop(bars=48)`` or ``duration="2d"``.
- to_snapshottestingfunctionA run, or a mapping of numbers, text, lists and mappings, as the plain structure a snapshot
- trtafunctionindicatorTrue range: the bar's range widened to take in the gap from the previous close.
- TradeforgeclassOne closed round trip, or the closed part of one: an entry fill, its exit fill and the money.
- TrailforgeclassA stop that follows the price. Build one with a constructor, like ``fg.Trail.atr(3.0)``.
- trixtafunctionclassindicatorTRIX: the one-bar change of a triple smoothed EMA, as a fraction and not a percent.
- TrueRangetaclassThe largest of the bar's range and its gaps from the previous close.
- UP_DOWN_KINDSdrawconstant
- use_call_targetsindicatorfunctionThe first argument of every ``self.use(...)`` in the class's methods, in source order.
- use_target_keyindicatorfunctionThe registry key a ``self.use`` first argument names; ``use_invalid`` when it names none.
- uses_from_sourceindicatorfunctionThe built-in indicators this class names in ``self.use(...)``, sorted, each once.
- validate_wire_styledrawfunctionCheck a style as a ``SeriesPage`` or the registry carries it: known keys, then every rule.
- valuewhentafunctionThe source on the bar where the condition last held, or the ``occurrence``-th time before.
- variancetafunctionclassindicatorVariance: the mean squared distance of the last ``period`` values from their average.
- venuesessionsfunctionThe symbol's own market hours. ``None`` is the strategy's primary symbol.
- vidyatafunctionclassindicatorChande's variable index dynamic average.
- vlinedrawfunctionA vertical line through one bar.
- VolumeparamclassTick volume or real traded volume (04 IND-043).
- volumestafunctionclassindicatorThe volume of each bar, and whether it is above the previous bar's.
- votesignalsfunctionTrue from the bar the weighted share of true conditions reaches ``open_at`` percent until the
- vwaptafunctionclassindicatorVolume-weighted average price from each anchor, with bands at its weighted deviation.
- vwmatafunctionclassindicatorVolume weighted average: ``sum(price * volume) / sum(volume)`` over the last ``period`` bars.
- warmup_expression_from_nodeindicatorfunctionOne warm-up expression from a literal, a ``lambda self: ...`` or a ``def warmup(self)``.
- warmup_manifest_from_nodeindicatorfunctionThe warm-up manifest from a ``warmup`` node: what the class and the load check both say.
- warmup_nodeindicatorfunctionThe class's ``warmup`` assignment value or ``def warmup``, or ``None``.
- WARN_ATpropconstant
- week_enddatesfunctionThe last day of each week.
- week_startdatesfunctionThe first day of each week.
- weekdaysdatesfunctionThe named weekdays, like ``weekdays("mon", "fri")``: mon, tue, wed, thu, fri, sat, sun.
- WIDTH_STYLESdrawconstant
- wildertafunctionWilder's smoothed average: seeded with the mean of the first ``period`` values.
- WilliamsRtaclassWhere the close sits in the recent range, from 0 down to -100.
- wmatafunctionclassindicatorLinearly weighted average: weight ``period`` on the newest value down to 1 on the oldest.
- wprtafunctionindicatorWilliams %R: where the close sits in the recent range, from 0 down to -100.