How do I call HighestFC? And what's the C# equivalent of Max  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
SSS
Posts: 14
Joined: 01 Apr 2013
Has thanked: 10 times
Been thanked: 2 times

How do I call HighestFC? And what's the C# equivalent of Max

Postby SSS » 01 Apr 2013

Hello all.

I'm trying out MultiCharts .NET an trying to learn C#. Although I'm not a professional programmer, I've done a fair amount of programming in EasyLanguage (on TS) and I'm familiar with OO through programming in Python.

One of my EL indicators tries to figure out the Highest High in, let's say, the last 10 candles. Also, part of the calculation involves deciding whether to consider just the body of the candle or the wicks.

The EasyLanguage code is this:

If includeWicks then myHighestHigh = Highest(High, 10)
else myHighestHigh = Highest(MaxList(Open, Close), 10)

What would the equivalent code be in PowerLanguage .NET?

I'm stuck at two places: How to call the HighestFC function? And what is the equivalent of MaxList (a function that determines the bigger of the two arguments).

Any help is appreciated.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: How do I call HighestFC? And what's the C# equivalent of  [SOLVED]

Postby Henry MultiСharts » 02 Apr 2013

Hello SSS,

You can find an example how to use a function in any prebuilt study.
For example Highest function is used in Channel_Breakout_LE & Channel_Breakout_SE signals.
You can open them if you go to PowerLanguage .Net Editor->File tab->Open.

For MaxList please refer to Math Class @ MSDN.

SSS
Posts: 14
Joined: 01 Apr 2013
Has thanked: 10 times
Been thanked: 2 times

Re: How do I call HighestFC? And what's the C# equivalent of

Postby SSS » 03 Apr 2013

Thanks, Henry. That was very helpful.

Your answer prompted me to try working with Visual Studio 2010, hoping I'd find in it some way of searching for terms (like HighestFC) to see how they're used.

However, when I launch VS the functions are not in the list of scripts. I get an alphabetical list of indicators and signals, but not functions (except functions that I have created). Is there a way to make VS show functions?

Better still, is there a way to make VS show three tree-lists (Functions, Indicators, and Signals) like the PowerLanguage .NET editor?

Thanks in advance.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: How do I call HighestFC? And what's the C# equivalent of

Postby Henry MultiСharts » 04 Apr 2013

Hello SSS,

Functions are not in VS solution, they are built-in in PLEditor.
That means functions cannot be seen in Visual Studio.


* Added to MC .NET FAQ.

SSS
Posts: 14
Joined: 01 Apr 2013
Has thanked: 10 times
Been thanked: 2 times

Built-in "functions" or "methods" (if that's what they're ca

Postby SSS » 11 Apr 2013

Thanks Henry.

I have a follow-up question (perhaps this one, too, can be put in the FAQ).

By the way, for my earlier question, I've abandoned the use of HighestFC (which, to my understanding generates a series with full history remembered for each bar). Instead, I stumbled upon Bars.High.Highest which works for me. I stumbled upon it by accident, when I put in a dot "." after High and intellisense showed me there's a ".Highest" method that can come after my accidental dot.

Which brings me to my follow-up question: Is there a way to show these built-in functions in a list instead of relying on intellisense? I mean, while programming I can scroll through a list so I know what's already out there, instead of having to write code for basic things? Right now, the PowerLanguage .NET editor only shows functions that have been "written", but not the methods like .Highest.

In the PowerLanguage version, I can see those built-in functions in the Navigator. Most are read-only though, which is fine. Even TS's latter versions, 9.0 onwards, functions, properties, built-in variables, etc were all listed in a tree. Very helpful when learning a new programming lanugage.

Is there a way to see a list of available .methods other than intellisense?

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: How do I call HighestFC? And what's the C# equivalent of

Postby Henry MultiСharts » 12 Apr 2013

SSS, check out PublicFunctions Members in the PowerLanguage .Net help file.

User avatar
Analyst
Posts: 19
Joined: 09 Jul 2013
Has thanked: 3 times
Been thanked: 2 times

Re: How do I call HighestFC? And what's the C# equivalent of

Postby Analyst » 02 Oct 2013

I find the best way to explore PL.NET is using the object browser in Visual Studio. Attached is a screen shot. This will show you the organization of methods and properties within classes, and it even has a search feature. Enjoy!
Attachments
PL_Classes.jpg
(258.24 KiB) Downloaded 1257 times


Return to “MultiCharts .NET”