# Optimizing Boolean Parameters

Questions about MultiCharts and user contributed studies. quantarb
Posts: 51
Joined: 14 Apr 2012
Has thanked: 9 times
Been thanked: 32 times

### Optimizing Boolean Parameters

Optimizing Boolean Parameters
Hello, I am wondering how I go about optimizing Boolean parameters.

Ex.
I’m trying to find if the optimal value is true or false.
If condition1 = true then buy vs if condition1 = false then buy.

Any ideas?

TJ
Posts: 7235
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 991 times
Been thanked: 2058 times

### Re: Optimizing Boolean Parameters

Optimizing Boolean Parameters
Hello, I am wondering how I go about optimizing Boolean parameters.

Ex.
I’m trying to find if the optimal value is true or false.
If condition1 = true then buy vs if condition1 = false then buy.

Any ideas?
eg.

Code: Select all

```If condition1 = true then BUY else if condition1 = false then BUY;```

TJ
Posts: 7235
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 991 times
Been thanked: 2058 times

### Re: Optimizing Boolean Parameters

Optimizing Boolean Parameters
Hello, I am wondering how I go about optimizing Boolean parameters.

Ex.
I’m trying to find if the optimal value is true or false.
If condition1 = true then buy vs if condition1 = false then buy.

Any ideas?
You can make the condition numeric.

eg.

Code: Select all

```If LogicA = 1 then BUY else if LogicA = 0 then BUY;```

ps. MultiCharts can optimize your strategy for you, using either True/False or numeric logic. quantarb
Posts: 51
Joined: 14 Apr 2012
Has thanked: 9 times
Been thanked: 32 times

### Re: Optimizing Boolean Parameters

Hello TJ,

Thank you for your suggestion. I came up with the following solution. I can then find whether the optimal value is one or zero.

Input: Strategy(0);

if Strategy <> 0 then
begin