PureBytes Links
Trading Reference Links
|
Hello,
I can't figure out why the code I have copied and pasted prints some
but not all of the vertical bars listed in the procedure. The shapes
plot in the proper location but only some of the bars plot. I know I
can use cross to make things simple but I want to avoid using cross
since the next step will be to plot the bars in the blank chart space
using future arrays. I don't thing cross will work for future bars.
Thanks,
David K.
_SECTION_BEGIN("Fib Time");
pct = Param("Pivot %",0.09,0.04,60,0.01);
Hlb = Param (" Hi Pivots Back",1,1,100,1);
Llb = Param ("Low Pivots Back",1,1,100,1);
ext = Param("Extend Right",15,0,50,1);
col= Param("Color Start #",30,1,60,1);
pS=TroughBars(L,pct,1)==0;
pR=PeakBars(H,pct,1)==0;
xs1=SelectedValue(ValueWhen(pS,bi,Llb));
xr1= SelectedValue(ValueWhen(pR,bi,Hlb));
xr=BarIndex()==xr1;
xs=BarIndex()==xs1;
Plot(xs,"",33,2+styleLeftAxisScale|styleOwnScale|styleNoLabel);
Plot(xr,"",43,2+styleLeftAxisScale|styleOwnScale|styleNoLabel);
tx=IIf(xr1>xs1,xr1,xs1);
d = abs(round(xr1-xs1));
K=0;
Title="";
procedure pf(f,col)
{
K = K+1;
PlotShapes(shapeSmallCircle*(BarIndex()-tx==int((f*d))),col);
fx=-BarIndex()+tx+(f*d);
Plot(fx==0,"",col,2+styleLeftAxisScale|styleNoLabel);
Title=Title+WriteIf(fx>0,"\n "+NumToStr((f*100),1.2)+"% = "+WriteVal
(fx,1.0)+" bars","");
}
pf(0,col);
pf(0.382,36);
pf(0.50,29);
pf(0.618,43);
pf(1.0,55);
pf(1.618,34);
pf(2.0,23);
pf(2.62,10);
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL 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/
|