Is linked-list available in Easy/Power Language?

Questions about MultiCharts and user contributed studies.
kernel
Posts: 91
Joined: 19 Feb 2013
Has thanked: 21 times
Been thanked: 4 times

Is linked-list available in Easy/Power Language?

Postby kernel » 01 Jan 2016

Hi,

Wonder if other data structures than array, in particular, linked-list, is available in Easy/Power Language? If not, any plan of implementing it in the near future?

In many situations, that'd be much more convenient for handling HLCO data and other trading data in general than arrays.

-kernel

Xyzzy
Posts: 162
Joined: 19 Mar 2011
Has thanked: 43 times
Been thanked: 79 times

Re: Is linked-list available in Easy/Power Language?

Postby Xyzzy » 01 Jan 2016

EasyLanguage isn't an object-oriented language, so I don't believe there's any way to implement a linked list directly. EasyLanguage is great for writing quick scripts for backtesting and automated trading, but not so great for doing really complicated stuff. It's a trade-off.

Is this a feature that you truly need? Anything that you do with a linked list could also be implemented using an array (with some creative coding). I try to keep my trading strategies short and simple, and arrays have always been good enough for me.

If you do, consider these options:

1. You could write your own DLL in another language (like C++ or C#) that manages a linked list class. You can then call that DLL in your EasyLanguage code. Example here:
https://futures.io/easylanguage-program ... guage.html

2. Instead of using MultiCharts with EasyLanguage, you could consider MultiCharts .Net and use C# or VB .Net for your strategies. It would be relatively trivial to implement a linked list in those languages.

3. You could use the Global Variables add-in along with the ELCollections library. These provide support for resizable lists and maps (but not linked lists, per se).
https://www.multicharts.com/trading-sof ... _Variables

I hope this helps.

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

Re: Is linked-list available in Easy/Power Language?

Postby JoshM » 02 Jan 2016

EasyLanguage isn't an object-oriented language, so I don't believe there's any way to implement a linked list directly.
That's true, only fixed and dynamic arrays are by default possible in PowerLanguage. A multi-dimensional array is possible though, and in that case the first dimension can be used for bar number (or date time value), and the other dimension can hold an array with OHLC prices, if that's a solution for you Kernel. There are some examples of using multi-dimensional arrays on the forum, like this example of a sorted multi-dimensional array.
If not, any plan of implementing it in the near future?
Nope. More advanced programming features have been asked in 2011 and in 2014, but these didn't receive positive responses. With MultiCharts .NET also available I think that the assumption is that MC NET is for more advanced features, and PowerLanguage just stays how it is (easily accessible).


Return to “MultiCharts”