Instrument
property
Defines the Instrument in created historical data request.
Syntax
public Instrument Instrument { get; set; }
Example
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using PTLRuntime.NETScript;
namespace HistoricalDataRequestExamples
{
public class HistoricalDataRequestExamples : NETStrategy
{
public override void Init()
{
Instrument inst = Instruments.Current;
HistoricalDataRequest HistReq = new HistoricalDataRequest(inst,Period.Day);
double open = HistReq.Instrument.Type == InstrumentType.Forex ? HistReq.Instrument.Open : 0.0;
if (open != 0.0)
Print("Today's open equals: "+ open.ToString());
}
}
}
Discussion
Join PTMC community to post your comments
No comments yet. Be the first.