Volume (int offset)
method
Volume of Ticks for Bid/Ask based Historical data, or volume of Trades for Trade based Historical data.
Syntax
public double Volume (int offset)
Parameters
offset — int
Defines index of the required element.
Return
double
Returns double value representing the volume of the referenced element.
Example
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using PTLRuntime.NETScript;
namespace VolumeExamples
{
public class VolumeExamples : NETStrategy
{
public override void OnQuote()
{
Instrument inst = Instruments.GetInstrument("/ES[U4]");
HistoricalData data = GetHistoricalData(new HistoricalDataRequest(inst,Period.Min));
if(data!=null)
{
Print(data.Volume(1));
}
}
}
}
Discussion
Join PTMC community to post your comments
No comments yet. Be the first.