Ranking Failed - Help Please

I just joined Portfolio123. Seems very powerful and I am just getting used to it.

I am trying to create a stock formula for ranking.

Here is the parabolic formula I am trying to create:

-0.0057 * FRank("Eval(LinReg("Gmgn%(CTR,TTM),20)",SurpriseY(0),NA)",#all,#desc)^2 + 0.8214 * FRank("Eval(LinReg("Gmgn%(CTR,TTM),20)",SurpriseY(0),NA)",#all,#desc)

However, when I run it I get the following error:

Ranking failed on 03/29/2014: In 'Gross Margin Surprise'-> Error near 'LinReg': LinReg - Missing operands

What am I doing wrong and how can I fix it? I tried to look at the online resources, but I had no luck.

Any help would be greatly appreciated....thanks!

Quick feedback.. there seem to be few issues:

  1. When you nest quotes you have to use ` (the one below ~ in my keyboards) and "
  2. The iterations param for LinReg should be outside the "
1 Like