Alexander
User
 Platinum Boarder
| Posts: 68 |  |
|
Currency Trader Mag: Hitting Bids, Lifting Offers - 2006/06/08 16:36
The June 2006 issue of Currency Trader Magazine had an interesting article by Thom Hartle entitled "The Inside Market: Hitting Bids, Lifting Offers" discussing some of the merits of separately analyzing volume that hits the bid versus the offer, as opposed to simply looking at the total volume that occurred over any particular timeframe. For a free subscription to the magazine, be sure to sign up at http://www.currencytradermag.com.
tymoraPRO (http://www.tymorapro.com) keeps track of this type of information, so that you know whether trades occur on the bid side or the offer side, and extrapolates the most likely side for any questionable executions (such as inside prints). The information is available over each timeframe, so you can actually see the total up and down volume that occurred during each bar. This information is easily accessible for any scripts or charting indicators that are created by the user. The following example calculates the Cumulative Volume Delta (CVD) for a particular timeframe, and can be included as part of any trading system. Notice how you not only have access to the total up volume and down volume, but also to whether the high occurred before the low of the bar. You can also chart the CVD indicator by selecting it from the ChartVU studies menu. Since forex generally does not have any real volume figures associated with it, tymoraPRO also performs some clever extrapolation of potential tick volume based on how actively forex quotes are updated and refreshed from multiple market participants. As can be seen by the chart, this technique works very well to identify overall levels of trading activity throughout the cycles of fear and greed that continually occur in the marketplace.

Program TymoraPro_CVD_Demo_Script; // Formula Calculates CVD (Cumulative Volume Delta), which is similar to OBV (On Balance Volume)
const AssetN = '#EURUSD'; Bars = 50; TimeFrame = '15'; // 1,3,5,15,30,60 minute or D=Daily
var cd: TStringList; //buffer for chartdata DumS: string; cvd,volup,voldn: integer; i,dt,tm: integer; op,hi,lo,cl: extended; ok,HiFirst: boolean; function GetMyChartData: boolean; var ok: boolean; tmr: cardinal; begin Result := false; tmr := GetTickCount; repeat ok := GetChartData(AssetN,TimeFrame,cd,bars); if (not ok) and (GetTickCount-tmr >= 10000) then Begin writeln('ChartDataRequest TimedOut'); exit; End; if (not ok) then Sleep(100); //required to allow system to process other requests while inside loop until ok; Result := true; end;
Begin cd := TStringList.Create(); cd.Clear; ok := GetMyChartData; if (not ok) then exit; cvd := 0; //reset cvd value if (cd.count >= 1) then for i := cd.count-1 downto 0 do begin //iterate through each bar retrieved DumS := cd[i]; ok := ParseBar(DumS,dt,tm,op,hi,lo,cl,volup,voldn,HiFirst); if ok then begin cvd := cvd + (volup-voldn); writeln(inttostr(tm)+', '+inttostr(volup)+':'+inttostr(voldn)); // debug code to view up/dn volume end; end; writeln('Current CVD Total = '+inttostr(cvd)); // for debug window ShowMsg('CVD',AssetN+': Current CVD Total ['+TimeFrame+'m] = '+IntToStr(cvd),False,AssetN,0,clYellow,clNavy,clRed); //show result in a popup box cd.free; End.
|