Hello,

I hesitated to say anything, but I did write a complete VAP, VWAP, POC, VA 
function in AFL not long ago.  The reason I hesitated, is because I special 
cased it for ES futures with 0.25 point resolution, and I built the needed 
general purposes arrays out of standard AFL arrays.  This required at least 
5000 bars to get enough size for a VAP array.  It was built solely for 
indicator mode, to display yesterday's profile, and today's developing profile. 
 All for regular market hours.

This was a bit complicated and convoluted to pull off, even with all these 
restrictions.  I run it only on a one minute chart to get enough resolution.  
By rights, it should be run on a one tick chart.  I also have several 
selectable algorithms to determine the VA.  I have found the best one is 
rejecting prices from the extreme ends of the VAP asymmetrically, until only 
70% of the volume remains.  This will produce the smallest range of prices that 
contain 70% of the total trading volume.  Most of the standard algorithms like 
asymmetrical VAP out, or symmetrical VWAP out, give a wider range of prices, 
and include low volume areas, depending on the actual distribution of volume 
lumps.  Also, the market profile method, uses 30 minute buckets and PTO.  It is 
a very wide smear of the VAP methods.  I did not find much use for it.  

My broker (thinkorswim) provides a VAP display that runs from midnight.  For 
ES, I have found the results for the POC do differ from my version because ES 
trades a bit of volume pre market (depending on news).  As the day goes on, 
they get closer to the same price.  Also, since I only have one minute 
resolution, I distribute the volume equally across all the prices in the bar.  
My profile is smoother and easier to read, but not really as accurate at 
showing a sharp support or resistance price down to the tick.

If somebody wants to write a general DLL to provide this functionality, or if 
Tomasz wants to include it as a standard function, I would be happy to provide 
my insights and AFL code for reference.  I do not want to make a general 
disclosure of my AFL code right now because it is a hack job (I was waiting for 
Tomasz to provide better general purpose array support in native AFL to make it 
nice).  It was just to prototype it for my limited needs, and it would be too 
hard to directly adapt by any but expert AFL coders. 

If nothing else comes along, I may recode it to work with the Osaka plug-in and 
see how that works.  I have so far avoided using anything other than internal 
AFL arrays due to speed concerns -- and yes, I have a number of different 
functions that need general purpose arrays that waste space and time by using 
AFL arrays.

Best regards,

Dennis

On Jun 19, 2010, at 11:41 AM, Rob wrote:

> If you set AB to only show the RTH hour session the code should work 
> anyway... I'm looking at it right now in RTH session... looks fine.
> 
> --- In [email protected], "Edward Pottasch" <empotta...@...> wrote:
>> 
>> hi Bertieb,
>> 
>> yes indeed. Looked at this latest code and it is looking better although 
>> very slow. What I forgot to mention is that I want to use this POC and VAH 
>> for backtesting purposes using about 2 years of intraday data. 
>> 
>> Why do you want to use regular trading hours only? Because the volumes 
>> outside the regular hours is so low it will have little weight in the 
>> profile, will probably hardly give a different profile.  Maybe you can ask 
>> Kaka on the IT forum. I will have a look also,
>> 
>> rgds, Ed
>> 
>> 
>> 
>> 
>> 
>> 
>> From: bertieb_aus 
>> Sent: Saturday, June 19, 2010 4:00 PM
>> To: [email protected] 
>> Subject: [amibroker] Re: Point of Control
>> 
>> 
>> 
>> Hi Ed,
>> 
>> The latest MP code from Inditrader shows previous days POC and VAH, and I 
>> believe extends the lines to the right into todays trading.
>> 
>> Load up the code I'm using and see if it is what you wanted.
>> 
>> For me, however, I'm pretty desperate to get the regular trading session 
>> profiles in Amibroker happening. Maybe I'll have to hunt down a professional 
>> coder.
>> 
>> Regards
>> 
>> beriteb
>> 
>> --- In [email protected], "Edward Pottasch" <empottasch@> wrote:
>>> 
>>> yes I know about this code on Inditrader.
>>> 
>>> I think that if you just want to use the market profile for daytrading 
>>> there is enough code available. Peronally I would like to use for instance 
>>> the POC and the VAH of the previous day for todays trading. Therefor I 
>>> would like to have functions that make these lines available. One glance on 
>>> this IndiTrader code shows that using AFL this is not an easy task. I have 
>>> been planning to learn to write DLL's in C++ to be able to do this but have 
>>> not done much yet .... 
>>> 
>>> regards, Ed
>>> 
>>> 
>>> 
>>> 
>>> From: bertieb_aus 
>>> Sent: Saturday, June 19, 2010 1:20 PM
>>> To: [email protected] 
>>> Subject: [amibroker] Re: Point of Control
>>> 
>>> 
>>> 
>>> Please correct me if I am wrong, but aren't there are a lot of MP 
>>> indicators that have been written that contain the POC's and VA's. Please 
>>> see the files section of this yahoo group, and the file M.profile.rar
>>> 
>>> Are these what you are after ?
>>> 
>>> The only problem I have with these files (and its a big problem), is that 
>>> they are all looking at a full 24 hour session. So the initial balance etc 
>>> is all based on the trading from midnight.
>>> 
>>> If these indicators had a parameter to set the trading times that one 
>>> wanted to look at, they would be perfect. 
>>> 
>>> Does anybody here have the capability to add a parameter for trading 
>>> session time (based on local time) to these AFL codes (the latest one Im 
>>> using, (contained in M.profile.rar) is Market Profile 10122009mod
>>> 
>>> Thanks for any help anyone can provide.
>>> 
>>> bertieb
>>> 
>>> --- In [email protected], "Edward Pottasch" <empottasch@> wrote:
>>>> 
>>>> yes indeed PlotVAP is already there, don't know why it is not implemented. 
>>>> Several other softwares have it built in like ensign. I have no experience 
>>>> with this software:
>>>> 
>>>> http://ensign.editme.com/c070829
>>>> 
>>>> regards, Ed
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> From: Rob 
>>>> Sent: Friday, June 18, 2010 12:52 PM
>>>> To: [email protected] 
>>>> Subject: [amibroker] Re: Point of Control
>>>> 
>>>> 
>>>> 
>>>> Ed,
>>>> 
>>>> I am one of those who requested MP a long time back.
>>>> It's a shame because inherently the POC and Value areas are already 
>>>> produced by the PlotVAPOverlayA() function... but there seems to be some 
>>>> resistance to simply returning their values via AFL.
>>>> I have no idea why.
>>>> 
>>>> Thanks
>>>> 
>>>> --- In [email protected], "Edward Pottasch" <empottasch@> wrote:
>>>>> 
>>>>> hi,
>>>>> 
>>>>> this is tough using AFL. Several requests have been done for inherent 
>>>>> market profile functions but sofar I did not see anything yet.
>>>>> 
>>>>> I used some code from the library but it is not very efficient (added 
>>>>> code, mp_ed.afl). The POC plotted in the code is from the previous day.
>>>>> 
>>>>> On inditrader.com they did some work on the MP. Last code I had a look at 
>>>>> I added (MPNEW.afl),
>>>>> 
>>>>> regards, Ed
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> From: Rob 
>>>>> Sent: Friday, June 18, 2010 11:10 AM
>>>>> To: [email protected] 
>>>>> Subject: [amibroker] Point of Control
>>>>> 
>>>>> 
>>>>> 
>>>>> I'm looking to create my own Point of Control (POC) calculation... I know 
>>>>> PlotVAPOverlayA already calculates it, but I can't return the value via 
>>>>> AFL (or the standard deviations around that value).
>>>>> 
>>>>> So, basically at the very least I need to calculate a 'mode' price for 
>>>>> the days price action...
>>>>> 
>>>>> Any ideas of an efficient way to do this...?
>>>>> 
>>>>> Thanks
>>>>> 
>>>> 
>>> 
>> 
> 
> 
> 
> 
> ------------------------------------
> 
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
> 
> TO GET TECHNICAL SUPPORT send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> Yahoo! Groups Links
> 
> 
> 

Reply via email to