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

[amibroker] MS conversion



PureBytes Links

Trading Reference Links


Hello

The code below is not the true conversion from MS to AB.
Can any one help in converting this MS to AB
MS CODE:-
If(PREV = 1,
      If(CLOSE < HighestSince(1,PREV <> 1,CLOSE)*.96,
      -1,PREV),
      If(PREV = -1, If(CLOSE>LowestSince(1,PREV <> -1,CLOSE)*1.04,
      +1,PREV),
      If(PREV = 0, If(CLOSE>Lowest(CLOSE)*1.04,
      +1,
      If(CLOSE<Highest(CLOSE)*.96,
      -1,
      PREV)),PREV)))


Attempted to AB:-
IIf(Ref(C,1),IIf(C<HighestSince(C,1)*0.96),-1,Ref(C,0));
IIf(Ref(C,-1),IIf(C>LowestSince(C,-1)*1.04,1,Ref(C,0));
IIf(Ref(C,0),IIf(C>Lowest(C)*1.04,1,IIf(C<Highest(C)*.96,-1,Ref
(C)),Ref(C,0))));

Regards






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/