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

Re: The Unknown Future, graphs



PureBytes Links

Trading Reference Links

All described codes suppose at least two detected peaks in the past, 
respectively two detected troughs.
(this comes from 
p1!=ref(p1,-1)
tr1!=ref(tr1,-1)).
If the stock is young, or if the coefficient in peak, trough and zig 
function is high, only one peak is detected in the past.
It is better to apply Fibonacci retracements having at least two
peaks in the past, so a "basic" pattern is formatted for the stock.
For this case you will read an {empty} DAYS on the title.
You can wait for a second peak (respectively a second trough) or 
decrease the coefficient in peak, trough and zig functions.

Dimitris Tsokakis
--- In amibroker@xxxx, "Dimitris Tsokakis" <TSOKAKIS@xxxx> wrote:
> Besides the warning or informing title, if you want to see in your
> chart automatically drawn the 0.381 time retracement line, you
> may use the code
> 
> 
> maxgraph=10;
> p1=peak(h,10,1);
> v1=valuewhen(p1!=ref(p1,-1),cum(1),1);
> tr1=trough(l,10,1);
> v2=valuewhen(tr1!=ref(tr1,-1),cum(1),1);
> dt=v2-v1;
> ft=v2+0.381*dt-cum(1);
> FD=iif(int(ft)==0,p1,0.95*l);
> graph3=FD;
> graph3style=2;
> graph3barcolor=iif(FD>c,8,0);
> graph1=c;
> graph1style=64;
> /*graph0=zig(l,10);
> graph2=zig(h,10);
> graph2style=1;
> GRAPH2BARCOLOR=7;*/
> title=writeif(ft>=0,"FIB 0.381 TIME WILL OCCUR IN ","FIB 0.381 TIME 
OCCURRED ")
> +writeval(abs(ft),format=1.0)+" DAYS"+writeif(ft>=0,""," AGO");
> graphxspace=0.5;
> 
> Since in example gif descending days were 20, we expect a Fibonacci 
time 7.62 days later.
> In your daily graph you will have a green vertical line at day 7 
and at day 8.
> The magnitude of the green line is equal to the last significant 
peak.
> If you erase /* and */ you will also have peak and trough detection.
> The green lines will appear automatically on your graph one day 
before the event.
> 
> Dimitris Tsokakis