Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
Try this :
PercentageValue:=0.05;{this represents 5%}
BuyCondition:=
Mov(C,5,S)>Ref(Mov(C,5,S),-1)
AND
Ref(Mov(C,5,S),-1)<Ref(Mov(C,5,S),-2)
AND
C>Ref(C,-1)
AND
Ref(C,-5)< Ref(C,-6)
AND
(C - Ref(C,-1))>(Ref(C,-6)-Ref(C,-5))
AND
(C - Ref(C,-5))>(Ref(C,-6)-Ref(C,-5));
HorizontalLine:=if(BuyCondition,C*(1+PercentageValue),
If(Roc(C,1,$)>0,Max(C*(1+PercentageValue),Prev),Prev));
HorizontalLine
|