Load (DateTime from, DateTime to)
method
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);
}
}
}
Discussion
Join PTMC community to post your comments
No comments yet. Be the first.