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

[amibroker] Graphing Beyond the data -Tomasz please help



PureBytes Links

Trading Reference Links

Tomasz,

I have reviewed your posts explaining how to create an array that 
extends beyond the last bar and then plot it using xshift.  I 
succeeded with line arrays but am having no success with time 
retracements into the future.  In my test reported x1 as 309, x110 
reported bar index as 313 and xshift reported 4.  X100 does not 
appear on the chart.  What am I doing wrong?
Thanks,

David K.

pct = Param( "Pivot %",1.0,0.10,60,0.01);
SetBarsRequired( 999999,999999);
pk=PeakBars(H,pct)==0; tr=TroughBars(L,pct)==0;
zHi=Zig(H,pct); zLo=Zig(L,pct); HLAvg=(zHi+zLo)/2;
zp=IIf(pk,zHi,IIf(tr,zLo,IIf(HLAvg>Ref(HLAvg,-1),H,L)));
za=Zig(zp,pct);
pR=Ref(za,-1)<za AND za>Ref(za,1);
pS=Ref(za,-1)>za AND za<Ref(za,1);
bi=BarIndex();
x1=BarCount-1;
xr1=SelectedValue(ValueWhen(pR,bi,1));
xs1=SelectedValue(ValueWhen(pS,bi,1));
xe = IIf(xr1>xs1,xr1,xs1);
xb=IIf(xr1<xs1,xr1,xs1);
d= xe-xb;
x100 = xe + round(d*1.0);
barsfromlast=x100-x1;
xshift = IIf(barsfromlast>0,barsfromlast,0);
Plot(bi==xr1,"",32,2|4|65536|32768|4096);
Plot(bi==xs1,"",43,2|4|65536|32768|4096);
Plot(bi==x100,"",42,2|4|65536|32768|4096,0,0,xshift);


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

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