Код: Выделить всё
function Initialize()
{
IndicatorName = "GO";
PriceStudy = false;
AddInput("Input", Inputs.Price);
AddSeries("A", DrawAs.Line, Color.Red);
}
function Evaluate()
{
if (CurrentIndex == MaxIndex)
{
//URL инструмента срочного рынка с сайта moex.com
string url = "https://www.moex.com/ru/contract.aspx?code=RTS-9.18";
System.Net.WebClient wc = new System.Net.WebClient();
wc.Encoding = System.Text.Encoding.UTF8;
string html = wc.DownloadString(url);
var PriceStep = System.Text.RegularExpressions.Regex.Match(html, "Гарантийное обеспечение \\(ГО, руб.\\)\\</td\\>\\<td\\>\\D\\D(.*?)\\s").Groups[1].ToString();
ShowMessage(PriceStep);
}
}