[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] POC and ValueArea



PureBytes Links

Trading Reference Links

Hello,

i'm new to AB, and i discover its powerful (and sometimes confusing ;-)) Array language.

I'm looking for a Market Profile indicator, and, at the moment, i didn't find anything convincing in AFL...

So i'm going to try and code it. Let's say at least POC and Value Area (in a first time).

For the moment, I can count TPO (not much, i know! ;-) )

nb_periodes_par_jour = Param("NB périodes par jour",30,1,48,1);
NewDay = Day()!= Ref(Day(), -1);
bars = BarsSince(NewDay);
r = int(H-L);
nb_tpo = Sum(r,bars);
Plot(nb_tpo,"NB TPO",colorBlue,4);

To get the POC, i need to count the TPO per level of price (between the highest and lowest of the day). And the Value Area is obtained by counting 70% of the tpo around (up and down) the POC.

But, as i can't dimension dynamic array, has someone an idea how to do that (my programming instinct is to do a loop from the beginning of the day to barcount-1, and for each bar to add 1 to each range (H-L) level. But to store the result, i need an array, for instance, in basic i should decalre this array: DIM My_array(Highestsince(newday,H)-Lowestsince(newday,L)) and use it to store the number of TPO per level of price.

Any idea?
 



------------------------------------

**** 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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/