Order Flow Volume Profile

View as Markdown

Description

The Order Flow Volume Profile indicator is used to plot singular static profiles containing a certain defined range of data or repeating profiles on a per bar or per session basis.

Syntax

OrderFlowVolumeProfile(MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes)

OrderFlowVolumeProfile(ISeries\<double\> input, MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes)

Returns the POC value

OrderFlowVolumeProfile(MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).Poc

OrderFlowVolumeProfile(ISeries\<double\> input, MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).Poc

Returns the ValueAreaHigh value

OrderFlowVolumeProfile(MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).ValueAreaHigh

OrderFlowVolumeProfile(ISeries\<double\> input, MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).ValueAreaHigh

Returns the ValueAreaLow value

OrderFlowVolumeProfile(MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).ValueAreaLow

OrderFlowVolumeProfile(ISeries\<double\> input, MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).ValueAreaLow

Return Value

double; Accessing this method property returns the current value.

Returns the DevelopingPoc value

OrderFlowVolumeProfile(MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).DevelopingPoc[int barsAgo]

OrderFlowVolumeProfile(ISeries\<double\> input, MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).DevelopingPoc[int barsAgo]

Returns the DevelopingValueAreaHigh value

OrderFlowVolumeProfile(MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).DevelopingValueAreaHigh[int barsAgo]

OrderFlowVolumeProfile(ISeries\<double\> input, MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).DevelopingValueAreaHigh[int barsAgo]

Returns the DevelopingValueAreaLow value

OrderFlowVolumeProfile(MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).DevelopingValueAreaLow[int barsAgo]

OrderFlowVolumeProfile(ISeries\<double\> input, MarketProfileType profileType, MarketProfilePeriod profilePeriod, int sessions, TradingHours tradingHoursInstance, MarketProfileResolution resolution, int valueAreaPercent, int initialBalanceMinutes).DevelopingValueAreaLow[int barsAgo]

RETURN VALUE

double; Accessing this method via an index value [int barsAgo] returns the indicator value of the referenced bar.

Parameters

inputIndicator source data (Series<T>)
profileTypeThe type of profile to generate:
• Volume
• Tick
• Price
profilePeriodThe period used for each profile:
• Session
• Bars
• Composite
• Weeks
• Months
sessionsHow many sessions will be grouped
tradingHoursInstanceThe TradingHours used for the data
resolutionGenerate profile using minute or tick data
• Minute
• Tick
valueAreaPercentRange of prices where a specific percentage of trading volume occurs
initialBalanceMinutesNumber of minutes in session range is set

Examples

1// A 1 tick and 1 minute data series must be added to the OnStateChange() as this indicator runs off of tick data or minute data
2else if (State == State.Configure)
3{
4 AddDataSeries(Data.BarsPeriodType.Tick, 1);
5 AddDataSeries(Data.BarsPeriodType.Minute, 1);
6}
7
8// OnBarUpdate() logic
9if (BarsInProgress == 0)
10{
11 double volumeProfilePoc = OrderFlowVolumeProfile(MarketProfileType.Volume, MarketProfilePeriod.Sessions, 1, BarsArray[0].TradingHours, MarketProfileResolution.Minute, 68, 0).Poc;
12 Print("The current Poc is " + volumeProfilePoc.ToString());
13
14 double volumeProfileDevelopingPoc = OrderFlowVolumeProfile(MarketProfileType.Volume, MarketProfilePeriod.Sessions, 1, BarsArray[0].TradingHours, MarketProfileResolution.Minute, 68, 0).DevelopingPoc[0];
15 Print(“The DevelopingPoc is+ volumeProfileDevelopingPoc.ToString());
16}
17else if (BarsInProgress == 1)
18{
19 // We have to update the secondary tick series of the cached indicator using Tick Resolution to make sure the values we get in BarsInProgress == 0 are in sync
20 OrderFlowVolumeProfile(MarketProfileType.Volume, MarketProfilePeriod.Sessions, 1, BarsArray[0].TradingHours, MarketProfileResolution.Minute, 68, 0).Update(volumeProfile.BarsArray[1].Count - 1, 1);
21}
1// A 1 tick and 1 minute data series must be added to the OnStateChange() as this indicator runs off of tick data or minute data
2else if (State == State.Configure)
3{
4 AddDataSeries(Data.BarsPeriodType.Tick, 1);
5 AddDataSeries(Data.BarsPeriodType.Minute, 1);
6
7 // If the tradingHoursInstance parameter for the indicator does not match the primary series, a data series must be added for tick, minute, and primary series bartype / interval using that trading hours
8 AddDataSeries(null, new BarsPeriod { BarsPeriodType = BarsPeriodType.Tick, Value = 1 }, "CME US Index Futures RTH");
9 AddDataSeries(null, new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 1 }, "CME US Index Futures RTH");
10 AddDataSeries(null, null, "CME US Index Futures RTH");
11}
12else if (State == State.DataLoaded)
13{
14 volumeProfile = OrderFlowVolumeProfile(MarketProfileType.Volume, MarketProfilePeriod.Sessions, 1, TradingHours.String2TradingHours("CME US Index Futures RTH"), MarketProfileResolution.Minute, 68, 0);
15 // The TicksPerLevel property is not an overload parameter.
16 // once an instance is generated, modify the TicksPerLevel or other properties to the desired values
17 volumeProfile.TicksPerLevel = 5;
18}
19
20// OnBarUpdate() logic
21if (BarsInProgress == 0)
22{
23 double volumeProfilePoc = volumeProfile.Poc;
24 Print("The current Poc is " + volumeProfilePoc.ToString());
25
26 double volumeProfileDevelopingPoc = volumeProfile.DevelopingPoc[0];
27 Print(“The DevelopingPoc is+ volumeProfileDevelopingPoc.ToString());
28}
29else if (BarsInProgress == 1)
30{
31 // We have to update the secondary tick series of the cached indicator using Tick Resolution to make sure the values we get in BarsInProgress == 0 are in sync
32 volumeProfile.Update(volumeProfile.BarsArray[1].Count - 1, 1);
33}