Parsing a web text with HtmlAgilityPack in a indicator

Questions about MultiCharts .NET and user contributed studies.
Tartalognion
Posts: 23
Joined: 17 Mar 2010
Has thanked: 20 times
Been thanked: 2 times

Parsing a web text with HtmlAgilityPack in a indicator

Postby Tartalognion » 03 Jun 2018

Hello,

I'm trying to use MC.NET for the first time (I use MC and I know VB but I'm a Rather newbie in VB.NET...)

I developped a code in VB.NET to parse a text from a website, and it works fine

The code needs to import HtmlAgilityPack

HtmlAgilityPack is a NuGet Package

I tried to run the code with MC.NET into an indicator but it doesn't recognize the objects of HtmlAgilityPack....

Imports System
Imports System.Drawing
Imports PowerLanguage
Imports PowerLanguage.Indicator
Imports PowerLanguage.Function
Imports System.Linq
Imports HtmlAgilityPack

Dim WebDoc As New HtmlWeb
Dim HtmlDoc As New HtmlDocument

Simply writing "Imports HtmlAgilityPack" does not work


I get the following error message in the Messagelog:
HtmlWeb and HtmlDocument are undefined....


It seems HtmlAgilityPack needs to be referenced...

How can I do that? Thank you in advance.

Tartalognion
Posts: 23
Joined: 17 Mar 2010
Has thanked: 20 times
Been thanked: 2 times

Re: Parsing a web text with HtmlAgilityPack in a indicator

Postby Tartalognion » 04 Jun 2018

Hello again,

I finally Found out, that we can add references with a right click. :D
I see that a reference can be "Global". I assume it means the references will be added for all my indicators, studies, Am I right?

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

Re: Parsing a web text with HtmlAgilityPack in a indicator

Postby Henry MultiСharts » 07 Jun 2018

I see that a reference can be "Global". I assume it means the references will be added for all my indicators, studies, Am I right?
Tartalognion, all references should be added through PowerLanguage .Net Editor only. The references you have added are global and available for all studies. Source: MultiCharts .NET FAQ


Return to “MultiCharts .NET”