PureBytes Links
Trading Reference Links
|
Hello,
How to translate MS to AFL:
1. Replace assignments := with =
2. Replace equality checks = with ==
3. Replace MOV( array, periods, S ) with MA
4. Replace MOV( array, periods, E ) with EMA
5. Replace If with IIF
6. Replace Input with Param
7. Replace singe quotes in string ' ' with double quotes " "
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "bruiserbbq" <bruiserbbq@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, February 20, 2005 5:58 AM
Subject: [amibroker] Indicator help...
>
>
> The code below is Metastock...can someone convert them to AB for me
> please? I'm hopeless at code.....in fact my wife thinks its not only
> code that I'm hopeless at.....but MOST THINGS.
>
> Market Sentiment Indicator.
>
> MaxVol:=2*(Mov(Volume,50,E));
> Adjustment:=VOLUME-(VOLUME-MaxVol);
> Value:=If(VOLUME>MaxVol,Adjustment,If(VOLUME<MaxVol,VOLUME,VOLUME));
> Up:=IF(CLOSE>Ref(CLOSE,-1),(CLOSE-Ref(CLOSE,-1))*V
> alue,(CLOSE-Ref(CLOSE,-1))*Value);
> Down:=If(CLOSE<Ref(CLOSE,-1),(Ref(CLOSE,-1)-CLOSE)
> *Value,(Ref(CLOSE,-1)-CLOSE)*Value);
> Mov(Sum(Up,21)-Sum(Down,21),3,E);0;
>
>
> OBV Index Indicator.
>
> Periods:=Input(`OBV Periods',1.55.21);
> Smooth:=Input(`Smoothing Periods',1,21,3);
> Trigger:=Input(`Trigger Line',1,35,13);
> Up:=(Sum(If(OBV()>Ref(OBV(),-1),0,OBV()-Ref(OBV(),-1)),Periods));
> Down:=(Sum(If(OBV()<Ref(OBV(),-1),0,Ref(OBV(),-1)-OBV()),Periods));
> Value:=(100-(100/(1+((Down+0.000001)/Up))));
> Mov(Value,Smooth,E);
> Mov(Value,Trigger,E);20;80;
>
> Thanks in advance
> Dumb (and hopless) Brusier!
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/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/
|