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

Re: Slow Stochastic moving buy-sell levels



PureBytes Links

Trading Reference Links

Stephane,
Just a hint:
Change the cross condition
Buy=Cross(Lol,StochK(5));
> Sell=Cross(StochK(5),Hil);
to
Buy=Cross(StochK(5),Lol);
Sell=Cross(Hil,Stochk(5));
to avoid premature entry and exit.
DT


--- In amibroker@xxxx, "Stephane Carrasset" <nenapacwanfr@xxxx> wrote:
> Excuse me remove the Macd, good code
> below
> 
> MaxGraph=9;
> Graph0=StochK(5);
> Graph0Style=1;
> Graph0Color=2;
> 
> 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);