[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] trailing stop



PureBytes Links

Trading Reference Links

Help me, please. I'd like to program a trailing stop. It seems everything is OK, but it does't work. What did I wrong? The code is 

PP:=Simulation.CurrentPositionProfit / Simulation.CurrentPositionValue;
condition1:=  PP<0.1;
condition2:= (PP>= 0.1 and PP<0.3);
condition3:= (PP>= 0.3 and PP<0.5);
condition4:= (PP>= 0.5 and PP<0.7);
condition5:= (PP>= 0.7 and PP<0.9);
condition6:= PP>= 0.9;
c<ref(LLV(c,20),-1) or
(if(condition6,
            PP<0.75,
if(condition5,
            PP<0.5,
if(condition4,
            PP<0.3,
if(condition3,
            PP<0.1,
if(condition2,
            PP<0.05,PP<-0.1))))))


__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___