settings.analyzer - PTMagicians/PTMagic GitHub Wiki
settings.analyzer.json
This page describes the market analysis, Global Settings, and Single Market Settings available in PTMagic 2.9.x.
These settings are configured in settings.analyzer.json.
A guide for editing JSON files is available here.
Market Analyzer | Market Trends | Global Settings | Single Market Settings | Examples
MarketAnalyzer
The Market Analyzer collects market data, calculates trends over configurable timeframes, and evaluates the conditions used by Global Settings and Single Market Settings.
StoreDataMaxHours
Number of hours of historical market data PTMagic retains.
This should be sufficient to cover the longest TrendMinutes period used by your Market Trends, with additional history available when needed.
Bundled example: 48
Expected values: Integer (hours)
IntervalMinutes
Interval, in minutes, between PTMagic Analyzer cycles.
Each cycle updates market data, calculates configured trends, evaluates triggers, and determines whether any ProfitTrailer settings should change.
Default: 5
Bundled example: 2
Expected values: Positive integer
ExcludeMainCurrency
Excludes the main trading currency from CoinMarketCap market trend calculations.
For example, when trading BTC pairs, this can exclude BTC itself from the market average.
This setting primarily affects CoinMarketCap analysis rather than ordinary exchange market trends.
Individual Market Trends also have an ExcludeMainCurrency property.
Default: true
Expected values: true, false
UseProfitTrailerEnabledPairs
Controls whether PTMagic restricts the analyzed market universe according to ProfitTrailer's configured enabled_pairs setting.
false: Analyze exchange markets matching ProfitTrailer's main market, subject to other applicable market filters.true: Use ProfitTrailer'senabled_pairslist to restrict the markets being analyzed.
This is useful when you want market analysis to reflect the coins your ProfitTrailer bot is configured to trade rather than the entire exchange market.
Implementation note: PTMagic 2.9.1 reads enabled_pairs for this setting. It does not independently parse disabled_pairs as part of this restriction. When enabled_pairs is ALL, empty, or another unrestricted value, the Analyzer uses the broader exchange market list.
Default: false
Expected values: true, false
UseProfitTrailerAllowedUnderlyingTypes
Binance Futures only.
Controls whether PTMagic uses ProfitTrailer's allowed_underlying_type setting to determine which Binance Futures asset classifications are included in market analysis.
false: Use PTMagic'sIncludedUnderlyingTypessetting.true: Use theallowed_underlying_typevalue from ProfitTrailer's active PAIRS configuration.
If allowed_underlying_type is missing, PTMagic falls back to IncludedUnderlyingTypes.
If the property exists but is blank, all classified underlying types are permitted.
Default: false
Expected values: true, false
IncludedUnderlyingTypes
Binance Futures only.
Specifies which Binance Futures underlying asset classifications PTMagic should include in market analysis when UseProfitTrailerAllowedUnderlyingTypes is disabled, or when its ProfitTrailer value is unavailable.
Supported classifications recognized by PTMagic 2.9.1 include:
COIN— Cryptocurrency markets.EQUITY— Equity-related markets.KR_EQUITY— Korean equity markets.HK_EQUITY— Hong Kong equity markets.CN_EQUITY— Chinese equity markets.COMMODITY— Commodity markets.INDEX— Index markets.PREMARKET— Pre-market instruments.FX— Foreign exchange markets.
The classifications available depend on the metadata supplied by Binance.
Example: Cryptocurrency Markets Only
"UseProfitTrailerAllowedUnderlyingTypes": false,
"IncludedUnderlyingTypes": [
"COIN"
]
Example: Multiple Asset Types
"IncludedUnderlyingTypes": [
"COIN",
"COMMODITY",
"INDEX"
]
An empty, missing, or null list permits all classified underlying types. Markets without valid classification metadata are not automatically admitted.
Underlying-type filtering is applied before selecting the highest-volume markets for a Global Market Trend.
Default: [] (No underlying-type restriction)
Bundled example: ["COIN"]
Expected values: Array of classification strings
MarketTrends
MarketTrends defines the market trend calculations available to Global Settings and Single Market Settings.
Each trend has a unique name, timeframe, market universe, and calculation options.
Multiple trends can be configured simultaneously, allowing short-term, medium-term, and long-term market conditions to be evaluated independently.
Name
A unique name identifying the Market Trend.
This name is referenced by Global Setting and Single Market Setting triggers through MarketTrendName.
Examples: 1h, 4h, 12h, 24h.
Expected values: Unique string
Platform
The source of market data used to calculate the trend.
Exchange: Uses market data from the configured exchange.CoinMarketCap: Uses CoinMarketCap market data, requiring a valid API key.
Exchange-based analysis is generally appropriate when evaluating the markets available to your ProfitTrailer bot.
CoinMarketCap remains supported in PTMagic 2.9.1 and may be useful when analyzing currencies or markets not directly represented by your exchange's selected trading market.
See CoinMarketCapAPIKey.
Important: Single Market Settings require Exchange-based trends. CoinMarketCap trends are intended for Global Market Trend analysis.
Default: "Exchange"
Expected values: Exchange, CoinMarketCap
MaxMarkets
Maximum number of markets included in the Global Market Trend calculation, selected by descending 24-hour trading volume.
0: Include all eligible markets.1: Include only the highest-volume eligible market.50: Include up to 50 eligible markets.
The selection is made after applicable market eligibility and filtering rules.
When creating a trend restricted using AllowedMarkets, setting MaxMarkets to 0 avoids unnecessarily limiting the configured market list.
Default: 0 (All eligible markets)
Expected values: Integer >= 0
TrendMinutes
Number of minutes over which the market trend is calculated.
Examples:
| Trend | TrendMinutes |
|---|---|
| 15 minutes | 15 |
| 1 hour | 60 |
| 2 hours | 120 |
| 4 hours | 240 |
| 8 hours | 480 |
| 12 hours | 720 |
| 24 hours | 1440 |
Ensure StoreDataMaxHours provides enough historical data for the configured trends.
Expected values: Positive integer
TrendCurrency
Determines the currency used to express market price changes.
Market: Calculates trends relative to the configured trading market, such as BTC, ETH, or USDT.Fiat: Calculates trends using the fiat value of the main trading currency.
For example, when trading BTC pairs, Market measures individual coin changes relative to BTC, while Fiat also accounts for changes in BTC's fiat value.
For USDT-based trading, Market is generally the appropriate choice when evaluating performance in USDT terms.
Default: "Market"
Expected values: Market, Fiat
IgnoredMarkets
Comma-separated list of markets to exclude from this particular Market Trend.
This allows you to exclude coins that might distort the market average or that should not participate in a particular calculation.
Example:
"IgnoredMarkets": "BTC,ETH,BNB"
Default: ""
Expected values: Comma-separated market names
AllowedMarkets
Comma-separated list of markets permitted in this Market Trend.
When specified, only matching markets are included.
Example:
"AllowedMarkets": "BTC,ETH,SOL,BNB",
"MaxMarkets": 0
Leave empty to permit all otherwise eligible markets.
Market names can use the formats described in Specifying Coin Pairs.
Default: "" (All eligible markets)
Expected values: Comma-separated market names
TrendThreshold
Maximum absolute percentage change permitted when calculating the average market trend.
Markets exceeding the threshold in either direction are excluded from the average.
For example:
"TrendThreshold": 20
Markets with trend changes above +20% or below -20% are excluded from the average.
This prevents unusually volatile individual markets from disproportionately influencing the overall trend.
Set to 0 to disable outlier filtering.
Excluded markets can be identified in the Analyzer log.
Note: This setting affects average trend calculations. It is not a general trading eligibility filter.
Default: 0 (Disabled)
Expected values: Non-negative number representing percentage change
DisplayGraph
Controls whether this trend appears in the market trend graphs in the PTMagic Monitor.
Disabling unnecessary graph series can make the interface easier to read when many trends are configured.
Default: true
Expected values: true, false
DisplayOnMarketAnalyzerList
Controls whether the trend is shown in the individual market trend list on the Market Analyzer page.
This allows you to calculate additional trends for strategy triggers without displaying every trend in the Monitor's market list.
Default: true
Expected values: true, false
ExcludeMainCurrency
Optional per-trend override used when building CoinMarketCap market trends.
Setting this to false allows the main currency to participate in that trend, even when the Market Analyzer's general ExcludeMainCurrency setting is enabled.
Default: true
Expected values: true, false
Example Market Trends
"MarketTrends": [
{
"Name": "1h",
"Platform": "Exchange",
"MaxMarkets": 50,
"TrendMinutes": 60,
"TrendCurrency": "Market",
"TrendThreshold": 15,
"DisplayGraph": false,
"DisplayOnMarketAnalyzerList": true
},
{
"Name": "4h",
"Platform": "Exchange",
"MaxMarkets": 50,
"TrendMinutes": 240,
"TrendCurrency": "Market",
"TrendThreshold": 25,
"DisplayGraph": true,
"DisplayOnMarketAnalyzerList": true
},
{
"Name": "24h",
"Platform": "Exchange",
"MaxMarkets": 50,
"TrendMinutes": 1440,
"TrendCurrency": "Market",
"TrendThreshold": 50,
"DisplayGraph": true,
"DisplayOnMarketAnalyzerList": true
}
]
GlobalSettings
Global Settings automatically modify ProfitTrailer's trading configuration according to overall market conditions.
Each Global Setting contains trigger conditions and optional PAIRS, DCA, and INDICATORS properties.
Global Settings are evaluated in their configured order. The first matching setting is selected.
This allows more specific or extreme market conditions to be evaluated before broader conditions.
A fallback setting named Default should be included.
SettingName
Unique name identifying the Global Setting.
Examples: Bear, Sideways, Recovery, Bull.
Expected values: Unique string
TriggerConnection
Defines how the setting's triggers are combined.
Simple connections:
AND: Every trigger must match.OR: At least one trigger must match.
PTMagic 2.9.1 also supports tagged Boolean expressions, allowing more advanced combinations.
Example:
"TriggerConnection": "(A && B) || C"
The corresponding triggers must contain matching tags:
"Triggers": [
{
"Tag": "A",
"MarketTrendName": "1h",
"MaxChange": -2
},
{
"Tag": "B",
"MarketTrendName": "4h",
"MaxChange": -3
},
{
"Tag": "C",
"MarketTrendName": "24h",
"MaxChange": -5
}
]
This setting activates when both A and B are true, or when C is true.
Supported Boolean expression syntax includes:
&&— AND||— OR!— NOT- Parentheses for grouping.
Use unique trigger tags, and ensure every tag referenced by the expression exists.
Invalid expressions or missing required tags can cause the Analyzer to terminate with a configuration error.
Default: "AND"
Expected values: AND, OR, or valid tagged Boolean expression
Triggers
The conditions used to determine whether a Global Setting should activate.
Global Setting triggers evaluate the average change of a configured Market Trend.
Tag
Optional identifier used to reference an individual trigger in a Boolean expression.
Required when using tagged Boolean logic.
Default: ""
Expected values: Unique string within the setting
MarketTrendName
Name of a Market Trend previously defined in MarketTrends.
Expected values: Existing Market Trend name
MinChange
Minimum market trend percentage required for the trigger to match.
The comparison is inclusive.
For example:
"MinChange": 2
Matches market trend changes of 2% or greater, subject to any configured MaxChange.
Default: -100
Expected values: Number (percentage)
MaxChange
Maximum market trend percentage allowed for the trigger to match.
The comparison is exclusive.
For example:
"MaxChange": -3
Matches market trend changes below -3%, subject to any configured MinChange.
Default: 10000
Expected values: Number (percentage)
Combining MinChange and MaxChange
Both properties may be used to define a range:
{
"MarketTrendName": "4h",
"MinChange": -5,
"MaxChange": -2
}
This matches values:
-5% <= TrendChange < -2%
PairsProperties
Properties to apply to ProfitTrailer's PAIRS configuration.
Any compatible ProfitTrailer PAIRS property can be specified.
Example:
"PairsProperties": {
"DEFAULT_sell_only_mode_enabled": true,
"DEFAULT_trailing_buy_OFFSETPERCENT": 25
}
PTMagic also supports loading complete preset files:
"PairsProperties": {
"File": "PAIRS.properties"
}
DCAProperties
Properties to apply to ProfitTrailer's DCA configuration.
Example:
"DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25,
"DEFAULT_DCA_trailing_profit_OFFSETPERCENT": -25
}
A complete DCA preset can also be selected:
"DCAProperties": {
"File": "DCA.properties"
}
IndicatorsProperties
Properties to apply to ProfitTrailer's INDICATORS configuration.
Example:
"IndicatorsProperties": {
"File": "INDICATORS.properties"
}
Property Offsets
PTMagic supports direct property values and relative offsets.
- Direct value: Replaces the existing property value.
_OFFSET: Adds or subtracts a fixed numeric amount._OFFSETPERCENT: Adjusts the existing value by a percentage.
For example, assuming an original value of 100:
| Configuration | Result |
|---|---|
Direct value 50 |
50 |
_OFFSET: -20 |
80 |
_OFFSETPERCENT: -25 |
75 |
Offsets are calculated from the source property values, not by repeatedly compounding the previous Analyzer cycle's output.
Percentage offsets should not be confused with ProfitTrailer's own percentage-based configuration properties.
Default Global Setting
The final Global Setting should provide the fallback configuration.
Example:
{
"SettingName": "Default",
"PairsProperties": {
"File": "PAIRS.properties"
},
"DCAProperties": {
"File": "DCA.properties"
},
"IndicatorsProperties": {
"File": "INDICATORS.properties"
}
}
PTMagic uses this fallback when none of the preceding Global Settings matches.
SingleMarketSettings
Single Market Settings (SMS) apply coin-specific adjustments independently of the overall Global Setting.
They can evaluate individual market trends, 24-hour volume, and market age.
Multiple Single Market Settings may apply to the same coin, allowing different conditions to contribute to its final trading configuration.
Important: Each individual trigger evaluates one condition type: market trend, volume, or age. Use separate triggers to combine different condition types.
SettingName
Unique name identifying the Single Market Setting.
Expected values: Unique string
TriggerConnection
Controls how the setting's activation triggers are combined.
Supported values:
ANDOR- Tagged Boolean expressions, such as
(A && B) || C.
Tagged Boolean expressions use the same general syntax as Global Settings.
Default: "AND"
Expected values: AND, OR, or valid tagged Boolean expression
OffTriggerConnection
Controls how multiple OffTriggers are combined when determining whether an active Single Market Setting should deactivate.
AND: All OffTriggers must match.OR: Any OffTrigger may deactivate the setting.
Unlike the activation TriggerConnection, PTMagic 2.9.1 evaluates OffTriggerConnection using simple AND/OR logic.
Default: "AND"
Expected values: AND, OR
RefreshOffTriggers
Controls whether a Single Market Setting's stored activation information is refreshed when its activation triggers match again.
true: Refresh the activation timestamp, trigger snapshot, and recorded reference price when the activation conditions match.false: Preserve the existing activation information while the setting remains active.
This affects OffTriggers using HoursSinceTriggered or RelativeTrigger.
For example, if a setting should expire three hours after its original activation, RefreshOffTriggers: false prevents repeated matching conditions from continuously resetting the timer.
If the desired behavior is to keep extending the active period while conditions continue matching, true may be appropriate.
Default: true
Expected values: true, false
IgnoredMarkets
Comma-separated list of markets excluded from this Single Market Setting.
Example:
"IgnoredMarkets": "BTC,ETH,BNB"
Default: ""
Expected values: Comma-separated market names
AllowedMarkets
Comma-separated list of markets permitted to use this Single Market Setting.
An empty value allows all otherwise eligible markets.
Default: ""
Expected values: Comma-separated market names
IgnoredGlobalSettings
Comma-separated list of Global Settings during which this Single Market Setting will not be evaluated for activation.
Example:
"IgnoredGlobalSettings": "Bear,Tanking"
Default: ""
Expected values: Comma-separated Global Setting names
AllowedGlobalSettings
Comma-separated list of Global Settings during which this Single Market Setting is permitted.
Example:
"AllowedGlobalSettings": "Bull,Recovery"
An empty value allows the Single Market Setting under any Global Setting.
Default: ""
Expected values: Comma-separated Global Setting names
StopProcessWhenTriggered
Controls whether additional Single Market Settings are evaluated for a coin after this setting matches.
false: Continue evaluating subsequent Single Market Settings.true: Stop processing additional Single Market Settings for that coin.
When multiple settings apply to the same property, the last applicable setting generally determines the final value.
Use this option when a condition should take priority over all later Single Market Settings.
Default: false
Expected values: true, false
Triggers
Activation conditions for the Single Market Setting.
Supported trigger types include:
- Individual market trend change.
- Relative performance against the broader market.
- 24-hour trading volume.
- Market age.
Tag
Optional identifier used in tagged Boolean expressions.
Example:
"Tag": "A"
Required when the setting uses an expression referencing this trigger.
Default: ""
Expected values: Unique string within the setting
MarketTrendName
Name of the configured Market Trend to evaluate.
Only trends using Platform: "Exchange" are valid for Single Market Settings.
Expected values: Existing Exchange Market Trend name
MarketTrendRelation
Determines how individual market trend performance is evaluated.
Relative
Compares the individual market's percentage change against the average percentage change of the configured Market Trend.
For example:
- Individual coin trend:
+8% - Average market trend:
+3% - Relative trend:
+5%
This is useful for identifying coins outperforming or underperforming the overall market.
Absolute
Uses the individual market's percentage change without subtracting the broader market average.
For example:
- Individual coin trend:
-6% - Absolute trend:
-6%
This is useful for identifying rapid price movements regardless of broader market conditions.
Default: "Relative"
Expected values: Relative, Absolute
MinChange
Minimum percentage change for the trigger to match.
Inclusive comparison.
Default: -100
Expected values: Number (percentage)
MaxChange
Maximum percentage change for the trigger to match.
Exclusive comparison.
Default: 10000
Expected values: Number (percentage)
Min24hVolume
Minimum 24-hour trading volume required for the trigger to match.
Volume is evaluated in the main trading market currency.
For example, with USDT as the main market:
{
"Min24hVolume": 1000000
}
Matches coins with at least 1,000,000 USDT in reported 24-hour volume.
Default: 0
Expected values: Non-negative number
Max24hVolume
Maximum 24-hour trading volume allowed for the trigger to match.
Example:
{
"Max24hVolume": 500000
}
Matches coins whose reported 24-hour volume does not exceed 500,000 units of the main trading currency.
The volume comparison uses inclusive minimum and maximum bounds.
Default: No effective upper limit
Expected values: Non-negative number
AgeDaysLowerThan
Matches coins whose age on the exchange is lower than the configured number of days.
Example:
{
"AgeDaysLowerThan": 21
}
Matches coins identified as having been listed for fewer than 21 days.
PTMagic obtains market age from available exchange listing-history information.
Important: If market age information is unavailable, the 2.9.1 activation logic treats the age trigger as matched as a precaution.
The older documentation specified a 100-day maximum. The 2.9.1 configuration model does not enforce that as a property limit, although the reliability of market age detection depends on the available historical data.
Default: 0 (Disabled)
Expected values: Positive integer (days)
OffTriggers
OffTriggers control when an active Single Market Setting is deactivated.
They allow a setting to remain active after its original activation condition is no longer satisfied.
For example, a coin experiencing a sharp price decline might remain restricted for several hours, or until a recovery condition is met.
MarketTrendName
Name of the Market Trend used to evaluate the OffTrigger.
Required when using a market trend condition.
Expected values: Existing Exchange Market Trend name
HoursSinceTriggered
Deactivates a Single Market Setting after the specified number of hours has elapsed since its stored activation time.
Example:
"OffTriggers": [
{
"HoursSinceTriggered": 3
}
]
The stored activation time may be refreshed by RefreshOffTriggers.
Important: This is an OffTrigger condition, not a guaranteed minimum duration of an applied restriction. If the original activation condition still matches, the setting may activate again.
Default: 0 (Disabled)
Expected values: Non-negative integer (hours)
MarketTrendRelation
Determines how the OffTrigger's market trend is evaluated.
Supported values:
Relative: Individual market trend relative to the average market trend.Absolute: Individual market trend without market-average adjustment.RelativeTrigger: Percentage price change since the stored activation price.
RelativeTrigger Example
Suppose a Single Market Setting was activated when a coin was priced at 100.
The price later increases to 105.
The RelativeTrigger change is +5%.
Example:
"OffTriggers": [
{
"MarketTrendName": "1h",
"MarketTrendRelation": "RelativeTrigger",
"MinChange": 5
}
]
This condition matches once the coin has increased at least 5% from the stored trigger price, assuming the reference price has not been refreshed.
Default: "Relative"
Expected values: Relative, Absolute, RelativeTrigger
MinChange
Minimum percentage change required for the OffTrigger to match.
Inclusive comparison.
Default: -100
Expected values: Number (percentage)
MaxChange
Maximum percentage change allowed for the OffTrigger to match.
Exclusive comparison.
Default: 10000
Expected values: Number (percentage)
Min24hVolume
Minimum 24-hour trading volume required for the OffTrigger to match.
Default: 0
Expected values: Non-negative number
Max24hVolume
Maximum 24-hour trading volume allowed for the OffTrigger to match.
Default: No effective upper limit
Expected values: Non-negative number
OffTrigger Evaluation
OffTriggers are checked for settings that were previously activated.
Each OffTrigger evaluates one condition type:
- Elapsed time, when
HoursSinceTriggeredis specified. - Trading volume, when volume limits are specified.
- Market trend conditions otherwise.
The results are combined using OffTriggerConnection.
Note: OffTriggers use AND/OR connection logic in PTMagic 2.9.1. Tagged Boolean expressions are supported by activation triggers, not by the OffTrigger evaluation routine.
Single Market Properties
PairsProperties
Coin-specific adjustments to ProfitTrailer PAIRS properties.
Example:
"PairsProperties": {
"DEFAULT_sell_only_mode_enabled": true,
"DEFAULT_trading_enabled": false
}
PTMagic applies these properties to individual markets matching the Single Market Setting.
DCAProperties
Coin-specific DCA property adjustments.
Example:
"DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25
}
IndicatorsProperties
Coin-specific indicator property adjustments.
Example:
"IndicatorsProperties": {
"DEFAULT_A_buy_value_OFFSET": -2
}
These sections support applicable ProfitTrailer properties and PTMagic's offset syntax.
See the ProfitTrailer Configuration Reference for available ProfitTrailer settings.
Configuration Examples
The following examples demonstrate PTMagic 2.9.1 functionality. The conditions and thresholds are illustrative rather than recommended trading strategies.
1. Market Analyzer Configuration
This example analyzes Binance Futures cryptocurrency markets using the top 50 eligible coins by volume.
{
"AnalyzerSettings": {
"MarketAnalyzer": {
"StoreDataMaxHours": 48,
"IntervalMinutes": 2,
"ExcludeMainCurrency": true,
"UseProfitTrailerEnabledPairs": false,
"UseProfitTrailerAllowedUnderlyingTypes": false,
"IncludedUnderlyingTypes": [
"COIN"
],
"MarketTrends": [
{
"Name": "1h",
"Platform": "Exchange",
"MaxMarkets": 50,
"TrendMinutes": 60,
"TrendCurrency": "Market",
"TrendThreshold": 15,
"DisplayGraph": true,
"DisplayOnMarketAnalyzerList": true
},
{
"Name": "4h",
"Platform": "Exchange",
"MaxMarkets": 50,
"TrendMinutes": 240,
"TrendCurrency": "Market",
"TrendThreshold": 25,
"DisplayGraph": true,
"DisplayOnMarketAnalyzerList": true
}
]
},
"GlobalSettings": [
{
"SettingName": "Default",
"PairsProperties": {
"File": "PAIRS.properties"
},
"DCAProperties": {
"File": "DCA.properties"
},
"IndicatorsProperties": {
"File": "INDICATORS.properties"
}
}
],
"SingleMarketSettings": []
}
}
This is a complete example of the top-level Analyzer structure.
2. Global Setting With Boolean Logic
The following Global Setting activates when both the 1-hour and 4-hour trends are negative beyond their thresholds, or when the 24-hour trend falls below a more extreme threshold.
{
"SettingName": "Bear",
"TriggerConnection": "(A && B) || C",
"Triggers": [
{
"Tag": "A",
"MarketTrendName": "1h",
"MaxChange": -2
},
{
"Tag": "B",
"MarketTrendName": "4h",
"MaxChange": -3
},
{
"Tag": "C",
"MarketTrendName": "24h",
"MaxChange": -5
}
],
"PairsProperties": {
"DEFAULT_initial_cost_OFFSETPERCENT": -50,
"DEFAULT_trailing_buy_OFFSETPERCENT": 25
},
"DCAProperties": {
"DEFAULT_DCA_trailing_buy_OFFSETPERCENT": 25
}
}
The referenced 1h, 4h, and 24h trends must already exist in MarketTrends.
Place more restrictive Global Settings before less restrictive ones, with the Default fallback at the end.
3. Single Market Setting With Multiple Conditions
The following example restricts coins that have declined significantly relative to the broader market and have comparatively low trading volume.
{
"SettingName": "WeakMarketProtection",
"TriggerConnection": "A && B",
"OffTriggerConnection": "OR",
"RefreshOffTriggers": false,
"StopProcessWhenTriggered": true,
"Triggers": [
{
"Tag": "A",
"MarketTrendName": "1h",
"MarketTrendRelation": "Relative",
"MaxChange": -5
},
{
"Tag": "B",
"Max24hVolume": 1000000
}
],
"OffTriggers": [
{
"HoursSinceTriggered": 3
},
{
"MarketTrendName": "1h",
"MarketTrendRelation": "RelativeTrigger",
"MinChange": 5
}
],
"PairsProperties": {
"DEFAULT_sell_only_mode_enabled": true,
"DEFAULT_DCA_enabled": false
}
}
This setting:
- Activates when both activation conditions match.
- Applies the specified coin-specific restrictions.
- Preserves its original activation timestamp and reference price while active.
- Uses OR logic for its OffTriggers.
- Stops evaluation of later Single Market Settings for that coin while matched.
4. Restrict Newly Listed Coins
{
"SettingName": "NewCoinProtection",
"TriggerConnection": "OR",
"StopProcessWhenTriggered": true,
"Triggers": [
{
"AgeDaysLowerThan": 21
}
],
"PairsProperties": {
"DEFAULT_trading_enabled": false,
"DEFAULT_sell_only_mode_enabled": true
}
}
This example restricts coins identified as having been listed within the previous 21 days.
Age information must be available and reliable for the intended behavior.
Important Behavior and Compatibility Notes
Market Universe Selection
PTMagic 2.9.1 introduces additional control over which markets participate in Exchange-based analysis.
The relevant properties are:
UseProfitTrailerEnabledPairsUseProfitTrailerAllowedUnderlyingTypesIncludedUnderlyingTypes
These properties affect the analyzed market universe, not merely how results are displayed.
Binance Futures underlying-type eligibility uses exchange metadata rather than manually maintained symbol lists.
Global and Single Market Triggers
Both Global Settings and Single Market Settings support tagged Boolean expressions in TriggerConnection.
However:
- Global Settings use overall market trend averages.
- Single Market Settings can use individual trends, volume, and age.
- Single Market OffTriggers use simple AND/OR connection logic.
SMS Activation Persistence
Single Market Settings can remain active after their original activation conditions stop matching when suitable OffTriggers are configured.
RefreshOffTriggers controls whether repeated activations refresh the stored activation information.
This setting is particularly important when using time-based OffTriggers or RelativeTrigger price comparisons.
Setting Priority
- Global Settings are evaluated in order, and the first matching condition is selected.
- The
DefaultGlobal Setting acts as the fallback. - Multiple Single Market Settings can affect the same market.
StopProcessWhenTriggeredcontrols whether additional Single Market Settings are evaluated.- When multiple Single Market Settings modify the same property, later applicable settings generally take precedence.
Legacy Functionality
The following functionality remains available in PTMagic 2.9.1 and should not be removed from the documentation:
- CoinMarketCap market trends.
- Exchange-based market trends.
- Market and Fiat trend currencies.
- Market-specific allow and ignore lists.
- Trend outlier filtering.
- Global and Single Market Settings.
- Time, volume, and price-based OffTriggers.
- Preset file switching.
- Direct property values and numeric offsets.
No original configuration property documented on this page has been removed from the 2.9.1 configuration model.
The principal documentation additions concern market-universe filtering, Boolean trigger expressions, trigger tags, and SMS activation refresh behavior.
Additional Notes
- Market Trends referenced by triggers must exist in
MarketTrends. - Single Market Settings should use Exchange-based trends.
MaxMarkets: 0means all eligible markets, not zero markets.TrendThreshold: 0disables outlier exclusion.- Missing or invalid market history can affect trend calculations.
- Offset calculations should be checked against the actual ProfitTrailer property values.
- Test new configurations using PTMagic TestMode and ProfitTrailer's testing facilities before enabling live automated changes.
For additional information, see the PTMagic Wiki and ProfitTrailer Configuration Reference.