NexusTrade guide

Modified Bitcoin Grid Trading Dollar Cost Average Strategy

Buy Bitcoin and double down when positions are down. Sell a small portion when positions are up.

Rule summary

  1. Buy 20% of the portfolio in BTC-USD (cryptocurrency) whenever the value of the BTC-USD position is below 100 or the gain or loss on the BTC-USD position (%) is below -20.

    Buy 20% BTC-USD Position market value (BTC-USD) < Constant 100 or Position P&L % (BTC-USD) < Constant -20

  2. Sell 5% of the portfolio worth of BTC-USD (cryptocurrency) whenever the gain or loss on the BTC-USD position (%) is at or above 10.

    Sell 5% BTC-USD Position P&L % (BTC-USD) ≥ Constant 10

What this recipe does

Buy Bitcoin 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.

json
[
  {
    "_id": "6aca34097473bd0006ad07ac",
    "name": "Buy 20% of the portfolio in BTC-USD (cryptocurrency) whenever the value of the BTC-USD position is below 100 or the gain or loss on the BTC-USD position (%) is below -20.",
    "active": true,
    "condition": {
      "name": "Position market value (BTC-USD) < Constant 100 or Position P&L % (BTC-USD) < Constant -20",
      "_id": "6aca340996f1a32a02d6aed6",
      "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": "BTC-USD",
                "symbol": "BTC-USD",
                "type": "Cryptocurrency"
              }
            ],
            "form": {
              "fields": [
                {
                  "fields": [
                    {
                      "helperText": "Ticker name (ex. SPY, BTC)",
                      "name": "targetAssets.name",
                      "label": "Asset Name",
                      "required": true,
                      "fieldType": "text",
                      "value": "BTC-USD"
                    },
                    {
                      "helperText": "Ticker type (ex. Stock, Crypto)",
                      "name": "targetAssets.type",
                      "label": "Asset Type",
                      "required": true,
                      "fieldType": "select",
                      "values": [
                        "Stock",
                        "Cryptocurrency"
                      ],
                      "value": "Cryptocurrency"
                    }
                  ],
                  "multiple": true,
                  "deletable": false
                }
              ]
            },
            "type": "PositionValue",
            "name": "Position market value (BTC-USD)"
          },
          "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 (BTC-USD) < Constant 100",
          "_id": "6aca3409f69ee20ec9b6b2e8",
          "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": "BTC-USD",
                "symbol": "BTC-USD",
                "type": "Cryptocurrency"
              }
            ],
            "form": {
              "fields": [
                {
                  "fields": [
                    {
                      "helperText": "Ticker name (ex. SPY, BTC)",
                      "name": "targetAssets.name",
                      "label": "Asset Name",
                      "required": true,
                      "fieldType": "text",
                      "value": "BTC-USD"
                    },
                    {
                      "helperText": "Ticker type (ex. Stock, Crypto)",
                      "name": "targetAssets.type",
                      "label": "Asset Type",
                      "required": true,
                      "fieldType": "select",
                      "values": [
                        "Stock",
                        "Cryptocurrency"
                      ],
                      "value": "Cryptocurrency"
                    }
                  ],
                  "multiple": true,
                  "deletable": false
                }
              ]
            },
            "type": "PositionPercentChange",
            "name": "Position P&L % (BTC-USD)"
          },
          "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 % (BTC-USD) < Constant -20",
          "_id": "6aca3409d91f17dca3b45f7b",
          "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:09.253Z",
    "action": {
      "type": "Buy",
      "targetAsset": {
        "name": "BTC-USD",
        "symbol": "BTC-USD",
        "type": "Cryptocurrency"
      },
      "amount": {
        "type": "percent of portfolio",
        "amount": 20
      }
    },
    "orderExecution": {
      "type": "Market"
    },
    "automaticOrderApproval": false
  },
  {
    "_id": "6aca34097473bd0006ad07ae",
    "name": "Sell 5% of the portfolio worth of BTC-USD (cryptocurrency) whenever the gain or loss on the BTC-USD position (%) is at or above 10.",
    "active": true,
    "condition": {
      "lhs": {
        "compound": false,
        "targetAssets": [
          {
            "name": "BTC-USD",
            "symbol": "BTC-USD",
            "type": "Cryptocurrency"
          }
        ],
        "form": {
          "fields": [
            {
              "fields": [
                {
                  "helperText": "Ticker name (ex. SPY, BTC)",
                  "name": "targetAssets.name",
                  "label": "Asset Name",
                  "required": true,
                  "fieldType": "text",
                  "value": "BTC-USD"
                },
                {
                  "helperText": "Ticker type (ex. Stock, Crypto)",
                  "name": "targetAssets.type",
                  "label": "Asset Type",
                  "required": true,
                  "fieldType": "select",
                  "values": [
                    "Stock",
                    "Cryptocurrency"
                  ],
                  "value": "Cryptocurrency"
                }
              ],
              "multiple": true,
              "deletable": false
            }
          ]
        },
        "type": "PositionPercentChange",
        "name": "Position P&L % (BTC-USD)"
      },
      "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 % (BTC-USD) ≥ Constant 10",
      "_id": "6aca3409ab1183233d94efd6",
      "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:09.253Z",
    "action": {
      "type": "Sell",
      "targetAsset": {
        "name": "BTC-USD",
        "symbol": "BTC-USD",
        "type": "Cryptocurrency"
      },
      "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.