Load (DateTime from)
method
Synchronized loading data range form the specified time to the current.
Syntax
public bool Load (DateTime from)
Parameters
from — DateTime
Defines date and time of start period.
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(-1);
Hist.Load(date_from);
}
}
}
Discussion
Join PTMC community to post your comments
No comments yet. Be the first.