where is the error
the 2 indicators have the same code but not same value
First indicator : a exp moving average
Code: Select all
inputs:
Price( Close ),
Length( 200 ),
Displace( 0 ) ;
variables:
var0( 0 ) ;
var0 = XAverage( Price, Length ) ;
condition1 = Displace >= 0 or CurrentBar > AbsValue( Displace ) ;
if condition1 then
Plot1[Displace]( var0, "AvgExp" ) ;
Avg.Sd = StandardDev(Price, Avg.Length, 1);
Avg.High = MyAvg + (Avg.Sd * Avg.1stSd);
Avg.Low = MyAvg - (Avg.Sd * Avg.1stSd);
Code: Select all
Inputs:
Price(Close), Avg.Length(200), Avg.1stSd(0.5),
Avg.UpColor(Green), Avg.DnColor(Red), Avg.1stSdColor(blue),
Show.1stSd(True), Displace( 0 ) ;
Variables:
MyAvg(0), Avg.Sd(0), Avg.High(0), Avg.Low(0);
MyAvg = XAverage( Price, Avg.Length) ;
Avg.Sd = StandardDev(Price, Avg.Length, 1);
Avg.High = MyAvg + (Avg.Sd * Avg.1stSd);
Avg.Low = MyAvg - (Avg.Sd * Avg.1stSd);
condition1 = Displace >= 0 or CurrentBar > AbsValue( Displace ) ;
if condition1 then
begin
Plot1[Displace]( MyAvg, "MyAvg" ) ;
Plot2(Avg.High, "Avg.High", Avg.1stSdColor);
Plot3(Avg.Low, "Avg.low", Avg.1stSdColor);
end;
why the 2 indicators are not displayed after barnumber 200 (input mov avg 200)
thank you for your help
nuno