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

Re: Slow Stochastic moving buy-sell levels



PureBytes Links

Trading Reference Links

Dimitri,

I have done a first test with this:

MaxGraph=9;
Graph0=StochK(5);
Graph0Style=1;
Graph0Color=2;

Buy=Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() );

Stosell= IIf(StochK(5)>60,StochK(5),60);
Hil=(Peak(Stosell,1,1) + Peak(Stosell,1,2)+ Peak(Stosell,1,3))/3;

Graph1= Hil;
Graph1Style=1;
Graph1Color=3;
Stobuy= IIf(StochK(5)<40,StochK(5),40);
Lol=(Trough(Stobuy,1,1) + Trough(Stobuy,1,2)+ Trough(Stobuy,1,3))/3;
Graph2= Lol;
Graph2Style=1;
Graph2Color=5;

Buy=Cross(Lol,StochK(5));
Sell=Cross(StochK(5),Hil);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);

/*************************End*************************/


tested such a system.
> May I ask on your code how do you use the stochastic graphs, since 
> the buy-sell condition is independent, related only with macd and 
its 
> signal.
> DT 
> --- In amibroker@xxxx, "Stephane Carrasset" <nenapacwanfr@xxxx> 
wrote:
> > Dimitri,
> > 
> > Have you test a calculation of dynamic level with the previous 
> values 
> > of peak and trough? ( example below)
> > 
> > stephane
> > 
> > MaxGraph=9;
> > Graph0=StochK(5);
> > Graph0Style=1;
> > Graph0Color=2;
> > 
> > Buy=Cross( MACD(), Signal() );
> > Sell = Cross( Signal(), MACD() );
> > 
> > Stosell= IIf(StochK(5)>60,StochK(5),60);
> > Graph1= (Peak(Stosell,1,1) + Peak(Stosell,1,2)+ Peak
> (Stosell,1,3))/3;
> > Graph1Style=1;
> > Graph1Color=3;
> > Stobuy= IIf(StochK(5)<40,StochK(5),40);
> > Graph2= (Trough(Stobuy,1,1) + Trough(Stobuy,1,2)+ Trough
> > (Stobuy,1,3))/3;
> > Graph2Style=1;
> > Graph2Color=5;