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

[amibroker] Re: Help with Stochastic function



PureBytes Links

Trading Reference Links

Vinay,  after setting variables in the first 3 lines, try with this buy/sell formulae

KStoch = StochK(Periods,KSmooth);
DStoch = StochD(Periods,DSmooth);

BuyStoch  = Cross(KStoch, DStoch) and KStoch > 20;
SellStoch = Cross(DStoch, KStoch) and KStoch < 80;

UMR Perumal



--- In amibroker@xxxxxxxxxxxxxxx, "Vinay Gakkhar." <vgakkhar@xxx> wrote:
>
> Learned senior members,
> 
> I need help with the Stochastic function.
> 
> I want a buy signal when Stochastic %K has crossed % D while going up after crossing 20, and a sell signal when stochastic %K crosses %D while coming down after crossing 80.
> 
> periods = Param( "Periods", 15, 1, 200, 1 );
> Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
> Dsmooth = Param( "%D avg", 3, 1, 200, 1 );
> BuyStochastic1 = Cross( (StochK( periods , Ksmooth)), 20 ) ;
> SellStochastic1 = Cross( 80, (StochK( periods , Ksmooth)) ) ;
> BuyStochastic2 = Cross( (StochK( periods , Ksmooth)), (StochD( periods , Ksmooth, DSmooth )) ) ;
> SellStochastic2 = Cross( (StochD( periods , Ksmooth, DSmooth )), (StochK( periods , Ksmooth)) ) ;
> 
> Can someone please tell me what is wrong here, and how to correct it.
> 
> Many thanks.
> 
> vgakkhar
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/