How to optimize Formula(PercentChange(close, 14))'s parameter?

Questions about MultiCharts and user contributed studies.
yungcross1
Posts: 4
Joined: 27 Dec 2013
Has thanked: 2 times

How to optimize Formula(PercentChange(close, 14))'s parameter?

Postby yungcross1 » 29 Aug 2021

Hi All,

I want to optimize the Profolio_Rotation formula's parameter.
The sample code is below:

inputs:
Formula(PercentChange(close, 14));

I want to modify the code:

inputs:sampleday(14);
inputs:
Formula(PercentChange(close, sampleday));

But it will show error:
------ Compiled with error(s): ------
Wrong expression
line 3, column 9

How to optimize Formula(PercentChange(close, 14))'s parameter?

Thank you.

User avatar
Kate MultiCharts
Posts: 575
Joined: 21 Oct 2020
Has thanked: 7 times
Been thanked: 144 times

Re: How to optimize Formula(PercentChange(close, 14))'s parameter?

Postby Kate MultiCharts » 30 Aug 2021

Hello yungcross1,

Here's an example you can try using:

Code: Select all

inputs: sampleday(14); var: Formula(0); Formula = PercentChange(close, sampleday);


Return to “MultiCharts”