Issue with sorting in Scanner windwow  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
Al3cs
Posts: 34
Joined: Jun 22 2017
Location: Italy
Has thanked: 31 times
Been thanked: 1 time

Jul 03 2017

Hi all,
I have defined some parameters for scanning purpouse.
I have this issue with sorting function:
2017-07-03 16_04_45-Clipboard.png
(5.83 KiB) Downloaded 615 times
Looks like MC sort values as text, how can I fix it?

User avatar
Angelina MultiСharts
Posts: 260
Joined: Dec 28 2016
Has thanked: 28 times
Been thanked: 66 times

Jul 10 2017

Al3cs,

Please plot a numerical expression, not a string one.

User avatar
Al3cs
Posts: 34
Joined: Jun 22 2017
Location: Italy
Has thanked: 31 times
Been thanked: 1 time

Jul 11 2017

I have defined my var as a numeric one:

variable: var(0);

I have assigned a value with a numerical expression and then plotted a value with

Plot(var, "var");

The same indicator works well as a scanner in other workspaces (the biggest has less than 200 stocks) with different instruments but not in this one that contains more than 300 stocks.
It's exactly the same script.

User avatar
JoshM
Posts: 2196
Joined: May 20 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Jul 11 2017

I have defined my var as a numeric one:

(...)

The same indicator works well as a scanner in other workspaces (the biggest has less than 200 stocks) with different instruments but not in this one that contains more than 300 stocks.
It's exactly the same script.
What if you use the 'Same as Symbol' format for the values in the Scanner/Watchlist, instead of using a percentage? It might be that MultiCharts behind-the-scenes converts those numerical values to text values when it makes percentages of them.

Or does your other indicator also use percentage values in its column? There has to be a reason why the indicator works fine in one Scanner/Watchlist window and not in another.
2017-07-11_16-06-35.png
(7.97 KiB) Downloaded 544 times

User avatar
Al3cs
Posts: 34
Joined: Jun 22 2017
Location: Italy
Has thanked: 31 times
Been thanked: 1 time

Jul 11 2017

Bingo
With "Number" format it's all ok.
With "percentage" it goes wrong sorting.
Thank you!