stocastico con media mobile variabile (1 Viewer)

SPERO

Nuovo forumer
buongiorno

c'e' qualche Eistain (mi sembra si scriva cosi' :mmmm: ) che sa come inserire questi script nello stoch.slow ?
mi farebbe un'enorme piacere :)

questo lo script dello stoch.slow:
[LegacyColorValue = TRUE];

Inputs: Length(5), SlowLen(3),overbought(60),oversold(40);

Plot1(StochKSlow(Length, SlowLen), "%K-Slow");
Plot2(StochDSlow(Length, SlowLen), "%D-Slow");
Plot3( overbought, "OverBot" ) ;
Plot4( oversold, "OverSld" ) ;


questo invece la media variabile :

Inputs: Price(C), Period(3), CMOPeriod(9);
Variables: VI(0), factor(0),VMA(0);
factor = 2/(Period+1);
VI = AbsValue(CMO( CMOPeriod)/100);
if CurrentBar <= 1 then
begin
VMA = Price;
end
else
begin
VMA = (factor*VI*Price) + ((1-factor*VI)*VMA[1]);
end;

Plot1 (VMA,"VMA");



da quello che ho capito bisogna sostituire la media con cui lavora con lamedia variabile

forse ho scritto una cavolata :(

in ogni caso ringrazio anche solo del pensiero

domenico
 

SPERO

Nuovo forumer
o forse era questo lo stocastich.slow

orca che ignoranza

inputs:
PriceH( High ),
PriceL( Low ),
PriceC( Close ),
StochLength( 14 ),
SmoothingLength1( 3 ),
SmoothingLength2( 3 ),
SmoothingType( 1 ),
OverSold( 20 ),
OverBought( 80 ) ;

variables:
var0( 0 ),
var1( 0 ),
var2( 0 ),
var3( 0 ) ;

Value1 = Stochastic( PriceH, PriceL, PriceC, StochLength, SmoothingLength1,
SmoothingLength2, SmoothingType, var0, var1, var2, var3 ) ;

Plot1( var2, "SlowK" ) ;
Plot2( var3, "SlowD") ;
Plot3( OverBought, "OverBot" ) ;
Plot4( OverSold, "OverSld" ) ;


if CurrentBar > 2 then
begin
condition1 = var2 crosses over var3 and var2 < OverSold ;
if condition1 then
Alert( "SlowK crossing over SlowD" )
else
begin
condition1 = var2 crosses under var3 and var2 > OverBought ;
if condition1 then
Alert( "SlowK crossing under SlowD" ) ;
end;
end ;
 

Users who are viewing this thread

Alto