---
title: "Parameters"
description: "Parameters are project variables that your algorithm uses to define the value of internal variables like indicator arguments or the length of lookback windows."
canonical: https://www.quantconnect.com/docs/v2/cloud-platform/optimization/parameters
markdown: https://www.quantconnect.com/docs/v2/cloud-platform/optimization/parameters.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/01%20Cloud%20Platform/11%20Optimization/02%20Parameters
modified: 2026-10-30
index: https://www.quantconnect.com/llms.txt
---

# Parameters

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Cloud Platform](https://www.quantconnect.com/docs/v2/cloud-platform.md) > [Optimization](https://www.quantconnect.com/docs/v2/cloud-platform/optimization.md) > Parameters

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

[Video](https://player.vimeo.com/video/696287618)

## Introduction

Parameters are project variables that your algorithm uses to define the value of internal variables like indicator arguments or the length of lookback windows.

Parameters are stored outside of your algorithm code, but we inject the values of the parameters into your algorithm when you [launch an optimization job](https://www.quantconnect.com/docs/v2/cloud-platform/optimization/deployment.md#04-Launch-Optimization-Jobs). The optimizer adjusts the value of your [project parameters](https://www.quantconnect.com/docs/v2/cloud-platform/projects/structure.md#06-Parameters) across a range and step size that you define to minimize or maximize an objective function. To optimize some parameters, add some parameters to your project and add the `get_parameter` method to your code files.

## Set Parameters

Algorithm parameters are hard-coded values for variables in your project that are set outside of the code files. Add parameters to your projects to remove hard-coded values from your code files and to perform parameter optimizations. You can add parameters, set default parameter values, and remove parameters from your projects.

### Add Parameters

Follow these steps to add an algorithm parameter to a project:

1. [Open the project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#02-View-All-Projects).
2. In the Project panel, click **Add New Parameter**.
3. Enter the parameter name.
   The parameter name must be unique in the project.
4. Enter the default value.
5. Click **Create Parameter**.

To get the parameter values into your algorithm, see [Get Parameters](https://www.quantconnect.com/docs/v2/writing-algorithms/optimization/parameters.md#03-Get-Parameters).

### Set Default Parameter Values

Follow these steps to set the default value of an algorithm parameter in a project:

1. [Open the project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#02-View-All-Projects).
2. In the Project panel, hover over the algorithm parameter and then click the **pencil** icon that appears.
   ![Edit default parameter](https://cdn.quantconnect.com/i/tu/set-default-value.png)
3. Enter a default value for the parameter and then click **Save**.
   The Project panel displays the default parameter value next to the parameter name.

### Delete Parameters

Follow these steps to delete an algorithm parameter in a project:

1. [Open the project](https://www.quantconnect.com/docs/v2/cloud-platform/projects/getting-started.md#02-View-All-Projects).
2. In the Project panel, hover over the algorithm parameter and then click the **trash can** icon that appears.
   ![Delete a parameter](https://cdn.quantconnect.com/i/tu/delete-parameters.png)
3. Remove the `get_parameter` calls that were associated with the parameter from your code files.

## Get Parameters

To get the parameter values from the Project panel into your algorithm, see [Get Parameters](https://www.quantconnect.com/docs/v2/writing-algorithms/optimization/parameters.md#03-Get-Parameters).

## Number of Parameters

The cloud optimizer can optimize up to three parameters. There are several reasons for this quota. First, the optimizer only supports the [grid search strategy](https://www.quantconnect.com/docs/v2/cloud-platform/optimization/strategies.md), which is very inefficient. This strategy tests every permutation of parameter values, so the number of backtests that the optimization job must run explodes as you add more parameters. Second, the [parameter charts](https://www.quantconnect.com/docs/v2/cloud-platform/optimization/results.md#05-Parameter-Charts) that display the optimization results are limited to three dimensions. Third, if you optimize with many variables, it increases the likelihood of [overfitting](https://www.quantconnect.com/docs/v2/writing-algorithms/optimization/parameters.md#04-Overfitting) to historical data.

To optimize more than three parameters, [run local optimizations with the CLI](https://www.quantconnect.com/docs/v2/lean-cli/optimization/deployment.md#02-Run-Local-Optimizations).
