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

[amibroker] Re: The main N100 turning points



PureBytes Links

Trading Reference Links


Hi Dimitris,

Thank you for posing this interesting code. It works just fine but
when I use your other code with stockD(), I only get a streight green
line. I can see that the value of "p" and "t" cahnges but I do not see
no graph. what could be the problem?

Alan



--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
wrote:
> 
> Both codes try to answer the same question :
> When the market is bullish, how many CONSECUTIVE bars is the 
> indicator ascending ?
> Add these numbers and plot the result.
> For the complementary lines, when the market is bearish we search for 
> the # of the CONSECUTIVE descending bars.
> I hope the logic is simple.
> The results give a quite accurate description of the market [thanks 
> to the always existing DIRECTIONALITY] without significant lag.
> Dimitris
> --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
> wrote:
> > 
> > Another pair of lines may come from the respective MACD study.
> > Scan the N100 database, for all quotations, with
> > 
> > // The main N100 turning points, II
> > // by D. Tsokakis, Nov2004
> > y=DEMA(MACD(),10);
> > z= (y>0) * BarsSince ( y < Ref(y,-1) );
> > zz = (y<0) * BarsSince( y > Ref(y,-1) );
> > AddToComposite(z,"~z1","V");
> > AddToComposite(zz,"~zz1","V");
> > Buy=0;
> > 
> > to create the composites.
> > Then plot the results with
> > 
> > Plot(220,"",colorBlack,styledashed);
> > Plot(500,"",colorBlack,styledashed);
> > PER=5;
> > p=DEMA(Foreign("~z1","v"),PER);
> > t=DEMA(Foreign("~zz1","v"),PER);
> > Plot(p ,"p",colorTurquoise,8);
> > Plot(t ,"t",colorPink,8);
> > 
> > The turquoise peaks give the peaks of the market.
> > A divergence with the price chart would give more emphasis.
> > The pink peaks give without significant lag the market troughs.
> > These MACD lines may be combined with the respective StochD lines 
> for 
> > mutual confirmation.
> > See also
> > http://www.elitetrader.com/vb/attachment.php?s=&postid=634590
> > 
> > Dimitris
> > --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
> <TSOKAKIS@xxxx> 
> > wrote:
> > > 
> > > The green peaks give premature exit points.
> > > When followed by a lower green peak [divergence] give important 
> > exit 
> > > points !
> > > [black circle]
> > > The respective red peaks give premature  entries.
> > > If a divergence occurs [white circle] then some great entries are 
> > > predicted.
> > > [Oct8, 2002-March24, 2004-Aug11, 2004 etc]
> > > Run for the N100 database, all quotations the
> > > 
> > > // The main N100 turning points, by D. Tsokakis, Nov2004
> > > y=DEMA(StochD(),20);
> > > z=(y>70)*BarsSince(y<Ref(y,-1));
> > > zz=(y<30)*BarsSince(y>Ref(y,-1));
> > > AddToComposite(z,"~z","V");
> > > AddToComposite(zz,"~zz","V");
> > > Buy=0;
> > > 
> > > to create the composites.
> > > Then see the graphs with
> > > 
> > > Plot(200,"",colorBlack,styledashed);
> > > Plot(400,"",colorBlack,styledashed);
> > > PER=5;
> > > p=DEMA(Foreign("~z","v"),PER);
> > > t=DEMA(Foreign("~zz","v"),PER);
> > > Plot(p ,"p",colorBrightGreen,8);
> > > Plot(t ,"t",colorRed,8);
> > > CondP=Ref(p,-1)==HHV(p,3);
> > > CondT=Ref(t,-1)==HHV(t,3);
> > > p0=ValueWhen(CondP,Ref(p,-1));
> > > t0=ValueWhen(CondT,Ref(T,-1));
> > > PlotShapes(shapeCircle*(p0<Ref(p0,-1) AND Ref(p,-1)
> > >200),colorBlack);
> > > PlotShapes(shapeCircle*(t0<Ref(t0,-1) AND Ref(t,-1)
> > >200),colorWhite);
> > > 
> > > The signal for the most recent green peak was known after the 
> Nov18 
> > > close.
> > > It was equivalent to Sell at Nov19 open !
> > > [A probable lower green peak above 200 will signal the end of the 
> > > recent uptrend...]
> > > 
> > > Dimitris





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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