Well thanks already guys! I am happily suprised to get feedback this fast :-)
I will check out the Fml() function some more as i already came across this in the manual.
And further i will check out the substitutes for AND and OR. Thanks Roy for this advice!
Anyway, i am really a newbie to metastock. I have a background as a programmer, therefore my interest in this amazing program!
What i try to do is convert my existing code that i've used before in telechart (maybe somewhat familiar to some of you guys)
In Telechart i was able to scan securities with an algorithm using so called Personal Criteria Formula's. As far as i've discovered this is the same as you can do with the Explorer.
What I thusfar found (with shortened versions of the code) was that it took much more time with Metastock to calculate this formula. The formula I use is to plot different kinds of morning/eveningstars.
The code is right now only adjusted to the different syntax. For instance the Close of two days ago i usually wrote C2 and now Ref(C,-2). Because of the limited length you can use in a formula i was thinking
of creating a different formula for the seperate stars. The formula below is for all kinds of morningstars (doji, kicker etc.)
[code:1:9ad7398d88]
(O >= Ref(C,-1) AND C > O AND Ref(O,-1) = Ref(C,-1) AND Ref(C,-1) <= Ref(C,-2) AND C > Ref(C,-2) AND Ref(C,-2) < Ref(O,-2) AND Ref(C,-2) < Ref(C,-3) AND V > Ref(V,-1) AND Stoch(12,3) <= 30 AND C > 10 AND C >= (((Ref(O,-2) - Ref(C,-2)) * 0.40) + Ref(C,-2)) AND ((Mov(C,30,S) =< C) OR (((Mov(C,30,S) - C) / C) => 0.058) OR (((Mov(C,30,S) - C) / C) =< 0.01)) AND ((C – O) / O) => 0.009) OR (Ref(O,-2) > Ref(C,-2) AND Ref(O,-1) = Ref(C,-1) AND Ref(C,-1) > Ref(C,-2) AND O < C AND O < Ref(O,-1) AND C > Ref(C,-1) AND Ref(C,-2) < Ref(C,-3) AND V > Ref(V,-1) AND Stoch(12,3) <= 30 AND C > 10 AND C >= (((Ref(O,-2) - Ref(C,-2)) * 0.40) + Ref(C,-2)) AND ((Mov(C,30,S) =< C) OR (((Mov(C,30,S) - C) / C) => 0.058) OR (((Mov(C,30,S) - C) / C) =< 0.01)) AND ((C – O) / O) => 0.009) OR (Ref(C,-2) < Ref(O,-2) AND Ref(O,-1) < Ref(C,-1) AND C > O AND O >= Ref(C,-1) AND Ref(C,-1) <= Ref(C,-2) AND Ref(C,-2) < Ref(C,-3) AND C > Ref(C,-2) AND V > Ref(V,-1) AND Stoch(12,3) <= 30 AND C > 10 AND C >= (((Ref(O,-2) - Ref(C,-2)) * 0.40) + Ref(C,-2)) AND ((Mov(C,30,S) =< C) OR (((Mov(C,30,S) - C) / C) => 0.058) OR (((Mov(C,30,S) - C) / C) =< 0.01)) AND ((C – O) / O) => 0.009) OR (Ref(C,-2) < Ref(O,-2) AND Ref(O,-1) < Ref(C,-1) AND C > O AND O <= Ref(O,-1) AND Ref(C,-2) <= Ref(O,-1) AND C > Ref(C,-1) AND Ref(C,-1) > Ref(C,-2) AND Ref(C,-2) < Ref(C,-3) AND V > Ref(V,-1) AND Stoch(12,3) <= 30 AND C > 10 AND C >= (((Ref(O,-2) - Ref(C,-2)) * 0.40) + Ref(C,-2)) AND ((Mov(C,30,S) =< C) OR (((Mov(C,30,S) - C) / C) => 0.058) OR (((Mov(C,30,S) - C) / C) =< 0.01)) AND ((C – O) / O) => 0.009) OR (Ref(C,-2) < Ref(O,-2) AND Ref(O,-1) =< Ref(C,-1) AND C > O AND Ref(O,-2) > Ref(C,-1) AND C > Ref(C,-1) AND Ref(C,-2) < Ref(C,-3) AND C > Ref(C,-2) AND Ref(O,-2) > Ref(O,-1) AND V > Ref(V,-1) AND Stoch(12,3) <= 30 AND C > 10 AND C >= (((Ref(O,-2) - Ref(C,-2)) * 0.40) + Ref(C,-2)) AND ((Mov(C,30,S) =< C) OR (((Mov(C,30,S) - C) / C) => 0.058) OR (((Mov(C,30,S) - C) / C) =< 0.01)) AND ((C – O) / O) => 0.009) OR (Ref(C,-2) < Ref(O,-2) AND C > O AND Ref(O,-2) > Ref(C,-1) AND C > Ref(C,-1) AND Ref(C,-2) < Ref(C,-3) AND C > Ref(C,-2) AND Ref(O,-2) > Ref(O,-1) AND O < Ref(O,-1) AND O < Ref(C,-1) AND V > Ref(V,-1) AND Stoch(12,3) <= 30 AND C > 10 AND C >= (((Ref(O,-2) - Ref(C,-2)) * 0.40) + Ref(C,-2)) AND ((Mov(C,30,S) =< C) OR (((Mov(C,30,S) - C) / C) => 0.058) OR (((Mov(C,30,S) - C) / C) =< 0.01)) AND ((C – O) / O) => 0.009) OR (Ref(C,-2) = Ref(O,-2) AND C > O AND Ref(O,-2) > Ref(C,-1) AND C > Ref(C,-1) AND Ref(C,-2) < Ref(C,-3) AND C > Ref(C,-2) AND Ref(O,-2) > Ref(O,-1) AND Ref(O,-2) => Ref(O,-1) AND V > Ref(V,-1) AND Stoch(12,3) <= 30 AND C > 10 AND C >= (((Ref(O,-2) - Ref(C,-2)) * 0.40) + Ref(C,-2)) AND ((Mov(C,30,S) =< C) OR (((Mov(C,30,S) - C) / C) => 0.058) OR (((Mov(C,30,S) - C) / C) =< 0.01)) AND ((C – O) / O) => 0.009) OR (Ref(C,-2) < Ref(O,-2) AND Ref(O,-1) > Ref(C,-1) AND C > O AND C > Ref(O,-1) AND Ref(C,-1) <= O AND Ref(C,-1) <= Ref(C,-2) AND C > Ref(C,-2) AND Ref(C,-2) < Ref(C,-3) AND V > Ref(V,-1) AND Stoch(12,3) <= 30 AND C > 10 AND C >= (((Ref(O,-2) - Ref(C,-2)) * 0.40) + Ref(C,-2)) AND ((Mov(C,30,S) =< C) OR (((Mov(C,30,S) - C) / C) => 0.058) OR (((Mov(C,30,S) - C) / C) =< 0.01)) AND ((C – O) / O) => 0.009)
[/code:1:9ad7398d88]