![]() |
Metastock swing indicator. |
Post Reply ![]() |
Page <12 |
Author | |
charlie_8 ![]() Regular ![]() Joined: 06 Apr 2011 Posts: 21 |
![]() ![]() ![]() ![]() |
hi to all bs forum members,
i`m pretty new at BS. I have a swing indicator formula, that I often use in MS. could somebody help me to convert these 2 formulae in bullscript? SWING REVERSAL UP m1:= H<Ref(H,-1) AND L<Ref(L,-1); m2:= H<Ref(H,-2) AND L<Ref(L,-2) AND H>Ref(H,-1)AND L<Ref(L,-1); m3:=H<Ref(H,-3) AND L<Ref(L,-3) AND H>Ref(H,-2) AND L<Ref(L,-2) AND H>Ref(H,-1) AND L<Ref(L,-1); mark:= m1 OR m2 OR m3; set:=L >ValueWhen(1,mark,L) AND H>ValueWhen(1,mark,H) AND LowestSince(1,Ref(mark,-1),L) > ValueWhen(1,mark,L); sig:= If(mark,1, If(set,0,PREV)); Cross(sig=0,0.5) SWING REVERSAL DOWN m1:= H>Ref(H,-1) AND L>Ref(L,-1); m2:= H>Ref(H,-2) AND L>Ref(L,-2) AND H>Ref(H,-1) AND L<Ref(L,-1); m3:= H>Ref(H,-3) AND L>Ref(L,-3) AND H>Ref(H,-2) AND L<Ref(L,-2) AND H>Ref(H,-1) AND L<Ref(L,-1); mark:= m1 OR m2 OR m3; set:=L<ValueWhen(1,mark,L) AND H<ValueWhen(1,mark,H) AND HighestSince(1,Ref(mark,-1) , H) < ValueWhen(1,mark,H); sig:= If(mark,1, If(set, 0, PREV)); Cross(sig=0,0.5) Thank you :) |
|
![]() |
Post Reply ![]() |
Page <12 |
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |