Synchronized loading custom data range.


SYNTAX


public bool Load (DateTime from,DateTime to)


PARAMETERS


from — DateTime

Defines date and time of start period of the range.


to — DateTime

Defines date and time of end period of the range.


RETURN


bool Returns true if history was loaded.


EXAMPLE


using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using PTLRuntime.NETScript;

namespace LoadExamples
{
     public class LoadExamples : NETStrategy
     {       
         public override void Init()
         {
             Instrument inst = Instruments.Current;
             HistoricalData Hist = GetHistoricalData(new HistoricalDataRequest(inst, Period.Day));
             DateTime date_from = DateTime.Today.AddMonths(-6);
             DateTime date_to = DateTime.UtcNow;
             Hist.Load(date_from, date_to);
         }      
     }
}