Skip to main content

RLBuilderConfig

Reinforcement-learning section of a UI Builder strategy (RL Release 2). Additive and optional — present + enabled flips the strategy into the visual RL path, where codegen emits the validated FreqAI ReinforcementLearner skeleton with the feature nodes filled in (the scaffold's default reward in SP1; an editable reward tree in SP2). The freqai config block is still assembled by the Release-1 freqai.AssembleFreqaiBlock; this section is its visual-builder source. Gated to PRO + Enterprise via the reinforcement_learning feature.

type RLBuilderConfig {
enabled: Boolean!
algorithm: String!
timeframe: String
trainPeriodDays: Int
backtestPeriodDays: Int
identifier: String!
features: [IndicatorDefinition!]
reward: RewardExpressionJSON
modelRewardParameters: Map
rawRlConfig: Map
}

Fields

RLBuilderConfig.enabled ● Boolean! non-null scalar

Whether RL is active for this strategy. When false (or this section absent) the strategy is a normal builder strategy.

RLBuilderConfig.algorithm ● String! non-null scalar

The sb3/sb3-contrib algorithm class name (validated against rlAlgorithmCatalogue, e.g. "PPO"). Lands at rl_config.model_type.

RLBuilderConfig.timeframe ● String scalar

The strategy's base timeframe (e.g. "5m"). Feeds both the generated class timeframe and freqai include_timeframes (Freqtrade requires main timeframe ≤ include_timeframes).

RLBuilderConfig.trainPeriodDays ● Int scalar

Rolling training-window length in days. Defaults applied when omitted.

RLBuilderConfig.backtestPeriodDays ● Int scalar

How many days each trained model is used before the next rolling re-train. Defaults applied when omitted.

RLBuilderConfig.identifier ● String! non-null scalar

Namespaces the trained model under user_data/models.

RLBuilderConfig.features ● [IndicatorDefinition!] list object

Feature nodes — reuses the same IndicatorDefinition vocabulary as the builder. Each becomes a %-<name>-period observation column in feature_engineering_expand_all. Empty falls back to the scaffold's baseline feature set.

RLBuilderConfig.reward ● RewardExpressionJSON scalar

Optional reward-expression tree (RL Release 2 SP2) — a closed, whitelisted numeric vocabulary codegen'd into MyRLEnv.calculate_reward. Absent/empty/invalid emits the validated scaffold default reward. See uiBuilderReference.rewardNodeTypes / rewardOperandTypes.

RLBuilderConfig.modelRewardParameters ● Map scalar

Merged into rl_config.model_reward_parameters (where MyRLEnv.calculate_reward reads it).

RLBuilderConfig.rawRlConfig ● Map scalar

Advanced passthrough: arbitrary rl_config keys merged into the assembled rl_config. Explicit keys win over package defaults.

Member Of

UIBuilderConfig object