PureBytes Links
Trading Reference Links
|
Hi guys,
does anyone ever tried to code in AFL something like in subject.
I'm trying to split volumes on a 1 min TimeFrame according to a very
simple criteria that is:
positive volume --> if the 1 minute bar has C>O
negative volume --> if the 1 minute bar has C<O
and once I get the new arrays, use them in higher TFs.
I was thinking that TimeFrameCompress function would help me, but I
can't make it work out.
Many thanks in advance to anyone that will help me in understanding
and solving this matter.
Here is one of my several trial codes:
TFinuse= 5;
barStartTime = TimeNum();
TimeFrameSet(in1Minute);
Vol5p= IIf(frac(TimeNum()/100/5)==0, Sum(IIf(C>O, V, 0), 5), 0);
Volpos = Sum(IIf(C>O, V, 0),TFinuse);
Volneg = Sum(IIf(C<O, V, 0),TFinuse);
VolposTF = TimeFrameCompress(Volpos,TFinuse,compressLast);
VolnegTF = TimeFrameCompress(Volneg,TFinuse,compressLast);
TimeFrameRestore();
Volsum = VolposTF + VolnegTF ;
"TF in use = " +TFinuse;
"barStartTime = " +barStartTime ;
"Volpos = " + VolposTF;
"Volneg = " + VolnegTF;
"Volsum = " + Volsum ;
"V = " +V;
Filter=C>0;
AddColumn(Volume,"Volume");
AddColumn(VolposTF,"Vol+");
AddColumn(VolnegTF,"Vol-");
AddColumn(Vol5p,"Vol5p");
AddColumn(TFinuse,"TFinuse");
------------------------------------
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
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/
|