Rule summary
Buy 50% of the available cash in TQQQ whenever days since the last filled buy order of TQQQ is above 7 and the portfolio's value is below 17,000 and (the value of the TQQQ position is below 100 or the gain or loss on the TQQQ position (%) is below -20).
Buy TQQQ # of Days Since the Last Filled Buy Order of TQQQ > Constant 7 and Total portfolio value < Constant 17000 and Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20
Buy 25% of the available cash in TQQQ whenever days since the last filled buy order of TQQQ is above 30 and the portfolio's value is above 17,000 and the portfolio's value is below 25,000 and (the value of the TQQQ position is below 100 or the gain or loss on the TQQQ position (%) is below -20).
Buy TQQQ # of Days Since the Last Filled Buy Order of TQQQ > Constant 30 and Total portfolio value > Constant 17000 and Total portfolio value < Constant 25000 and Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20
Buy 10% of the available cash in TQQQ whenever days since the last filled buy order of TQQQ is above 60 and the portfolio's value is at or above 25,000 and (the value of the TQQQ position is below 100 or the gain or loss on the TQQQ position (%) is below -20).
Buy TQQQ # of Days Since the Last Filled Buy Order of TQQQ > Constant 60 and Total portfolio value ≥ Constant 25000 and Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20
Sell 5% of the portfolio worth of TQQQ whenever days since the last filled sell order of TQQQ is above 30 and the gain or loss on the TQQQ position (%) is at or above 10.
Sell 5% TQQQ # of Days Since the Last Filled Sell Order of TQQQ > Constant 30 and Position P&L % (TQQQ) ≥ Constant 10
What this recipe does
Buy TQQQ and double down when positions are down. Sell a small portion when positions are up.
Exact strategy rules
These are the library's actual rule definitions. Conditions, assets, position sizing and order actions are shown together so the strategy can be inspected before it is copied.
[
{
"_id": "6aca340a344737988fc7afc4",
"name": "Buy 50% of the available cash in TQQQ whenever days since the last filled buy order of TQQQ is above 7 and the portfolio's value is below 17,000 and (the value of the TQQQ position is below 100 or the gain or loss on the TQQQ position (%) is below -20).",
"active": true,
"condition": {
"name": "# of Days Since the Last Filled Buy Order of TQQQ > Constant 7 and Total portfolio value < Constant 17000 and Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340a91b8198303c2be47",
"type": "And",
"description": "All conditions must be true",
"example": "If Apple's price is up today but down for the week.",
"conditions": [
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"side": "Buy",
"form": {
"fields": [
{
"fields": [
{
"helperText": "Matches order events with this side (buy or sell)",
"name": "side",
"label": "Order side",
"required": true,
"fieldType": "select",
"values": [
"Buy",
"Sell"
],
"value": "Buy"
}
],
"multiple": false,
"deletable": false
},
{
"fields": [
{
"helperText": "Matches order events with this status",
"name": "orderStatus",
"label": "Order Status",
"required": true,
"fieldType": "select",
"values": [
"Pending",
"Accepted",
"Pending User Approval",
"Canceled",
"Filled",
"Partially Filled"
],
"value": "Filled"
}
],
"multiple": false,
"deletable": false
},
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": false,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": false,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "DaysSinceOrder",
"orderStatus": "Filled",
"name": "# of Days Since the Last Filled Buy Order of TQQQ"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 7,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 7,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 7"
},
"name": "# of Days Since the Last Filled Buy Order of TQQQ > Constant 7",
"_id": "6aca340abf93d4958957c958",
"comparison": "greaterThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"lhs": {
"compound": false,
"targetAssets": [],
"form": {
"fields": [
{
"fields": [],
"multiple": false,
"deletable": false
}
]
},
"type": "PortfolioValue",
"name": "Total portfolio value"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 17000,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 17000,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 17000"
},
"name": "Total portfolio value < Constant 17000",
"_id": "6aca340aa5416acf93b386b5",
"comparison": "lessThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"name": "Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340a7d42b38251b89bc7",
"type": "Or",
"description": "At least one condition must be true",
"example": "If Apple's price is up today or down for the week, or both.",
"conditions": [
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"form": {
"fields": [
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": true,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": true,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "PositionValue",
"name": "Position market value (TQQQ)"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 100,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 100,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 100"
},
"name": "Position market value (TQQQ) < Constant 100",
"_id": "6aca340a8a1231e9da31c79c",
"comparison": "lessThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"form": {
"fields": [
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": true,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": true,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "PositionPercentChange",
"name": "Position P&L % (TQQQ)"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": -20,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": -20,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant -20"
},
"name": "Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340afd6f0a1ffccd39c4",
"comparison": "lessThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
}
]
}
]
},
"createdAt": "2026-10-10T12:48:10.003Z",
"action": {
"type": "Buy",
"targetAsset": {
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
},
"amount": {
"type": "percent of buying power",
"amount": 50
}
},
"orderExecution": {
"type": "Market"
},
"automaticOrderApproval": false
},
{
"_id": "6aca340a344737988fc7afc6",
"name": "Buy 25% of the available cash in TQQQ whenever days since the last filled buy order of TQQQ is above 30 and the portfolio's value is above 17,000 and the portfolio's value is below 25,000 and (the value of the TQQQ position is below 100 or the gain or loss on the TQQQ position (%) is below -20).",
"active": true,
"condition": {
"name": "# of Days Since the Last Filled Buy Order of TQQQ > Constant 30 and Total portfolio value > Constant 17000 and Total portfolio value < Constant 25000 and Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340a017a55b9dc6eb8be",
"type": "And",
"description": "All conditions must be true",
"example": "If Apple's price is up today but down for the week.",
"conditions": [
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"side": "Buy",
"form": {
"fields": [
{
"fields": [
{
"helperText": "Matches order events with this side (buy or sell)",
"name": "side",
"label": "Order side",
"required": true,
"fieldType": "select",
"values": [
"Buy",
"Sell"
],
"value": "Buy"
}
],
"multiple": false,
"deletable": false
},
{
"fields": [
{
"helperText": "Matches order events with this status",
"name": "orderStatus",
"label": "Order Status",
"required": true,
"fieldType": "select",
"values": [
"Pending",
"Accepted",
"Pending User Approval",
"Canceled",
"Filled",
"Partially Filled"
],
"value": "Filled"
}
],
"multiple": false,
"deletable": false
},
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": false,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": false,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "DaysSinceOrder",
"orderStatus": "Filled",
"name": "# of Days Since the Last Filled Buy Order of TQQQ"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 30,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 30,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 30"
},
"name": "# of Days Since the Last Filled Buy Order of TQQQ > Constant 30",
"_id": "6aca340a9e83f3a91846d613",
"comparison": "greaterThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"name": "Total portfolio value > Constant 17000 and Total portfolio value < Constant 25000",
"_id": "6aca340a30e1130dfa3a34d6",
"type": "And",
"description": "All conditions must be true",
"example": "If Apple's price is up today but down for the week.",
"conditions": [
{
"lhs": {
"compound": false,
"targetAssets": [],
"form": {
"fields": [
{
"fields": [],
"multiple": false,
"deletable": false
}
]
},
"type": "PortfolioValue",
"name": "Total portfolio value"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 17000,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 17000,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 17000"
},
"name": "Total portfolio value > Constant 17000",
"_id": "6aca340aa305f553e10be5f5",
"comparison": "greaterThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"lhs": {
"compound": false,
"targetAssets": [],
"form": {
"fields": [
{
"fields": [],
"multiple": false,
"deletable": false
}
]
},
"type": "PortfolioValue",
"name": "Total portfolio value"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 25000,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 25000,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 25000"
},
"name": "Total portfolio value < Constant 25000",
"_id": "6aca340a159e583e24952fbb",
"comparison": "lessThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
}
]
},
{
"name": "Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340a800d63a9f4a969c1",
"type": "Or",
"description": "At least one condition must be true",
"example": "If Apple's price is up today or down for the week, or both.",
"conditions": [
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"form": {
"fields": [
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": true,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": true,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "PositionValue",
"name": "Position market value (TQQQ)"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 100,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 100,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 100"
},
"name": "Position market value (TQQQ) < Constant 100",
"_id": "6aca340a70a53205a6b358a8",
"comparison": "lessThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"form": {
"fields": [
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": true,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": true,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "PositionPercentChange",
"name": "Position P&L % (TQQQ)"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": -20,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": -20,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant -20"
},
"name": "Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340aea5e0a7450ef25de",
"comparison": "lessThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
}
]
}
]
},
"createdAt": "2026-10-10T12:48:10.004Z",
"action": {
"type": "Buy",
"targetAsset": {
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
},
"amount": {
"type": "percent of buying power",
"amount": 25
}
},
"orderExecution": {
"type": "Market"
},
"automaticOrderApproval": false
},
{
"_id": "6aca340a344737988fc7afc8",
"name": "Buy 10% of the available cash in TQQQ whenever days since the last filled buy order of TQQQ is above 60 and the portfolio's value is at or above 25,000 and (the value of the TQQQ position is below 100 or the gain or loss on the TQQQ position (%) is below -20).",
"active": true,
"condition": {
"name": "# of Days Since the Last Filled Buy Order of TQQQ > Constant 60 and Total portfolio value ≥ Constant 25000 and Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340a280212ea7d10fbd2",
"type": "And",
"description": "All conditions must be true",
"example": "If Apple's price is up today but down for the week.",
"conditions": [
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"side": "Buy",
"form": {
"fields": [
{
"fields": [
{
"helperText": "Matches order events with this side (buy or sell)",
"name": "side",
"label": "Order side",
"required": true,
"fieldType": "select",
"values": [
"Buy",
"Sell"
],
"value": "Buy"
}
],
"multiple": false,
"deletable": false
},
{
"fields": [
{
"helperText": "Matches order events with this status",
"name": "orderStatus",
"label": "Order Status",
"required": true,
"fieldType": "select",
"values": [
"Pending",
"Accepted",
"Pending User Approval",
"Canceled",
"Filled",
"Partially Filled"
],
"value": "Filled"
}
],
"multiple": false,
"deletable": false
},
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": false,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": false,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "DaysSinceOrder",
"orderStatus": "Filled",
"name": "# of Days Since the Last Filled Buy Order of TQQQ"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 60,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 60,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 60"
},
"name": "# of Days Since the Last Filled Buy Order of TQQQ > Constant 60",
"_id": "6aca340a5a2f894132c481be",
"comparison": "greaterThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"lhs": {
"compound": false,
"targetAssets": [],
"form": {
"fields": [
{
"fields": [],
"multiple": false,
"deletable": false
}
]
},
"type": "PortfolioValue",
"name": "Total portfolio value"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 25000,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 25000,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 25000"
},
"name": "Total portfolio value ≥ Constant 25000",
"_id": "6aca340a30c6aa87e0dc42ed",
"comparison": "greaterThanOrEqual",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"name": "Position market value (TQQQ) < Constant 100 or Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340a4842b98116122313",
"type": "Or",
"description": "At least one condition must be true",
"example": "If Apple's price is up today or down for the week, or both.",
"conditions": [
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"form": {
"fields": [
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": true,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": true,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "PositionValue",
"name": "Position market value (TQQQ)"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 100,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 100,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 100"
},
"name": "Position market value (TQQQ) < Constant 100",
"_id": "6aca340a2be9edc3b5673226",
"comparison": "lessThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"form": {
"fields": [
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": true,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": true,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "PositionPercentChange",
"name": "Position P&L % (TQQQ)"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": -20,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": -20,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant -20"
},
"name": "Position P&L % (TQQQ) < Constant -20",
"_id": "6aca340a0affb3fb01d92693",
"comparison": "lessThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
}
]
}
]
},
"createdAt": "2026-10-10T12:48:10.005Z",
"action": {
"type": "Buy",
"targetAsset": {
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
},
"amount": {
"type": "percent of buying power",
"amount": 10
}
},
"orderExecution": {
"type": "Market"
},
"automaticOrderApproval": false
},
{
"_id": "6aca340a344737988fc7afca",
"name": "Sell 5% of the portfolio worth of TQQQ whenever days since the last filled sell order of TQQQ is above 30 and the gain or loss on the TQQQ position (%) is at or above 10.",
"active": true,
"condition": {
"name": "# of Days Since the Last Filled Sell Order of TQQQ > Constant 30 and Position P&L % (TQQQ) ≥ Constant 10",
"_id": "6aca340ab797a218e3cfe529",
"type": "And",
"description": "All conditions must be true",
"example": "If Apple's price is up today but down for the week.",
"conditions": [
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"side": "Sell",
"form": {
"fields": [
{
"fields": [
{
"helperText": "Matches order events with this side (buy or sell)",
"name": "side",
"label": "Order side",
"required": true,
"fieldType": "select",
"values": [
"Buy",
"Sell"
],
"value": "Sell"
}
],
"multiple": false,
"deletable": false
},
{
"fields": [
{
"helperText": "Matches order events with this status",
"name": "orderStatus",
"label": "Order Status",
"required": true,
"fieldType": "select",
"values": [
"Pending",
"Accepted",
"Pending User Approval",
"Canceled",
"Filled",
"Partially Filled"
],
"value": "Filled"
}
],
"multiple": false,
"deletable": false
},
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": false,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": false,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "DaysSinceOrder",
"orderStatus": "Filled",
"name": "# of Days Since the Last Filled Sell Order of TQQQ"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 30,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 30,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 30"
},
"name": "# of Days Since the Last Filled Sell Order of TQQQ > Constant 30",
"_id": "6aca340a8092588de94d4222",
"comparison": "greaterThan",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
},
{
"lhs": {
"compound": false,
"targetAssets": [
{
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
}
],
"form": {
"fields": [
{
"fields": [
{
"helperText": "Ticker name (ex. SPY, BTC)",
"name": "targetAssets.name",
"label": "Asset Name",
"required": true,
"fieldType": "text",
"value": "TQQQ"
},
{
"helperText": "Ticker type (ex. Stock, Crypto)",
"name": "targetAssets.type",
"label": "Asset Type",
"required": true,
"fieldType": "select",
"values": [
"Stock",
"Cryptocurrency"
],
"value": "Stock"
}
],
"multiple": true,
"deletable": false
}
]
},
"type": "PositionPercentChange",
"name": "Position P&L % (TQQQ)"
},
"rhs": {
"compound": false,
"targetAssets": [],
"value": 10,
"form": {
"fields": [
{
"fields": [
{
"helperText": "Constant value",
"name": "value",
"label": "Value",
"required": true,
"fieldType": "number",
"value": 10,
"min": -100,
"max": 100,
"globalMin": -1000000,
"globalMax": 1000000,
"isInteger": false
}
],
"multiple": false,
"deletable": false
}
]
},
"type": "Value",
"name": "Constant 10"
},
"name": "Position P&L % (TQQQ) ≥ Constant 10",
"_id": "6aca340a3548a276df87e6c3",
"comparison": "greaterThanOrEqual",
"type": "Base",
"description": "Left-Hand indicator (comparator) Right-Hand Indicator",
"example": "If the Rate of Change of Apple's price is > the Value 0."
}
]
},
"createdAt": "2026-10-10T12:48:10.011Z",
"action": {
"type": "Sell",
"targetAsset": {
"name": "TQQQ",
"type": "Stock",
"symbol": "TQQQ"
},
"amount": {
"type": "percent of portfolio",
"amount": 5
}
},
"orderExecution": {
"type": "Market"
},
"automaticOrderApproval": false
}
]Before testing
Open the library, find this recipe by its title and preview the rules. Choose Use template for a built-in entry, or Add to portfolio for a saved entry. Review the copied rules and customize their thresholds and allocations before testing. Choose a historical period and starting capital in the portfolio backtester. Check trade count, drawdown, costs and a benchmark before enabling a paper portfolio. A recipe is a configuration, not a performance result.
A completed test should show the selected period, orders and portfolio statistics. If it records no trades, inspect the entry conditions and selected assets before loosening rules. If market data is missing or the run fails, keep the error and fix the coverage issue before comparing results. Changing a threshold or allocation changes the strategy. Keep the original definition and compare changes on a separate period rather than selecting settings from one favorable result.