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

RE: [amibroker] digital Stochastic



PureBytes Links

Trading Reference Links



Can rewrite this
summ = 0;
for( i = 5; i < BarCount; i++ )
{
if ((22*KAdjusted[i]+8*DAdjusted[i])/30 >50) summ[i]=1;
if ((22*KAdjusted[i]+8*DAdjusted[i])/30 <50) summ[i]=-1;
}
xAverage = EMA(Summ,5);
 
 
to
summ=iif(((22*Kadjust+8*Dadjust)/30)>=50,1,-1);
xaverage = ema(summ,5);
 

 

To: amibroker@xxxxxxxxxxxxxxx
From: gonzales74@xxxxxxxxx
Date: Thu, 12 Nov 2009 22:47:51 +0000
Subject: [amibroker] digital Stochastic

 
Hi,

tried to translate this code from TradeSignal to Amibroker (but I think I did something wrong):

TradeSignal Code:

Meta:
Synopsis( "Digitale Stochastic - (c)2008 kahler@xxxxxxxxxxxxat -
Info: Trader`s 08/2008" ),
SubChart( True ),
WebLink( "http://www.quanttrader.at" );

Inputs:
PeriodStoch( 5, 1 ),
PeriodSmoothing1( 3, 1 ),
PeriodSmoothing2( 3, 1 ),
OverBought( 80, 0, 100 ),
OverSold( 20, 0, 100 );

Variables:
fast_k( 0 ),
slow_k( 0 ),
slow_d( 0 ),
summ;
{ Berechnung fast_k, slow_k }
StochasticNormal( High, Low, Close, PeriodStoch, PeriodSmoothing1,
PeriodSmoothing2, fast_k, slow_k, slow_d );

{ Digitalisierung }
if (22*slow_k+8*fast_k)/30 >50 then summ=1;
if (22*slow_k+8*fast_k)/30 <50 then summ=-1;

{ Darstellung }
DrawLine(xaverage(summ,periodStoch), "digitale Stochastic" );

AFL:

KAdjusted = StochK(5,3);
DAdjusted = StochD(5,3,3);

// Digitalisierung
summ = 0;
for( i = 5; i < BarCount; i++ )
{
if ((22*KAdjusted[i]+8*DAdjusted[i])/30 >50) summ[i]=1;
if ((22*KAdjusted[i]+8*DAdjusted[i])/30 <50) summ[i]=-1;
}
xAverage = EMA(Summ,5);

Plot (xAverage, "Stoch. Dig.", colorBlack);

Is my code right?

Thanks and regards, dubi




Find the right PC with Windows 7 and Windows Live. Learn more.

__._,_.___


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





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___