Merhabalar,
Aşağıdaki şekilde deneyiniz,
al
fastLength_L := 5;
slowLength_L := 18;
slopeLength_L := 7;
slopeThreshold_L :=0.5;
atrLength_L := 1;
atrThreshold_L := 0.03;
fastLength_S := 6;
slowLength_S := 20;
slopeLength_S := 6;
slopeThreshold_S := 0.4;
atrLength_S := 7;
atrThreshold_S :=0.04;
fastMA_L := Mov(C, fastLength_L, E);
slowMA_L := Mov(C, slowLength_L, S);
fastMA_S := Mov(C, fastLength_S, S);
slowMA_S := Mov(C, slowLength_S, E);
fastSlope_L := (fastMA_L - Ref(fastMA_L, -slopeLength_L)) / slopeLength_L;
slowSlope_L := (slowMA_L - Ref(slowMA_L, -slopeLength_L)) / slopeLength_L;
fastSlope_S := (fastMA_S - Ref(fastMA_S, -slopeLength_S)) / slopeLength_S;
slowSlope_S := (slowMA_S - Ref(slowMA_S, -slopeLength_S)) / slopeLength_S;
atr_L := ATR(atrLength_L); atr_S := ATR(atrLength_S);
isFlat_L := Abs(fastSlope_L) < slopeThreshold_L AND Abs(slowSlope_L) < slopeThreshold_L;
lowVolatility_L := atr_L < atrThreshold_L;
longCondition := Cross(fastMA_L, slowMA_L) AND isFlat_L AND lowVolatility_L;
isFlat_S := Abs(fastSlope_S) < slopeThreshold_S AND Abs(slowSlope_S) < slopeThreshold_S;
lowVolatility_S := atr_S < atrThreshold_S;
shortCondition := Cross(slowMA_S, fastMA_S) AND isFlat_S AND lowVolatility_S;
Buy := longCondition;
Sell := shortCondition;
Buy
sat
fastLength_L := 5;
slowLength_L := 18;
slopeLength_L := 7;
slopeThreshold_L :=0.5;
atrLength_L := 1;
atrThreshold_L := 0.03;
fastLength_S := 6;
slowLength_S := 20;
slopeLength_S := 6;
slopeThreshold_S := 0.4;
atrLength_S := 7;
atrThreshold_S :=0.04;
fastMA_L := Mov(C, fastLength_L, E);
slowMA_L := Mov(C, slowLength_L, S);
fastMA_S := Mov(C, fastLength_S, S);
slowMA_S := Mov(C, slowLength_S, E);
fastSlope_L := (fastMA_L - Ref(fastMA_L, -slopeLength_L)) / slopeLength_L;
slowSlope_L := (slowMA_L - Ref(slowMA_L, -slopeLength_L)) / slopeLength_L;
fastSlope_S := (fastMA_S - Ref(fastMA_S, -slopeLength_S)) / slopeLength_S;
slowSlope_S := (slowMA_S - Ref(slowMA_S, -slopeLength_S)) / slopeLength_S;
atr_L := ATR(atrLength_L); atr_S := ATR(atrLength_S);
isFlat_L := Abs(fastSlope_L) < slopeThreshold_L AND Abs(slowSlope_L) < slopeThreshold_L;
lowVolatility_L := atr_L < atrThreshold_L;
longCondition := Cross(fastMA_L, slowMA_L) AND isFlat_L AND lowVolatility_L;
isFlat_S := Abs(fastSlope_S) < slopeThreshold_S AND Abs(slowSlope_S) < slopeThreshold_S;
lowVolatility_S := atr_S < atrThreshold_S;
shortCondition := Cross(slowMA_S, fastMA_S) AND isFlat_S AND lowVolatility_S;
Buy := longCondition;
Sell := shortCondition;
Sell
iyi çalışmalar