PureBytes Links
Trading Reference Links
|
Hi Gernot
I think the code below is Easy Language, for TradeStation. I'm not familiar with the language and
don't attempt conversions. There are other around that may be able to help you. It's possible that
the code is impossible to convert because of MetaStock's limitations.
I would rather attempt to build up the code from an English language description but sadly I already
have more work than I can cope with.
Sorry.
Regards
Roy
----- Original Message -----
From: "taotra" <taotrader@xxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Tuesday, June 29, 2004 9:34 AM
Subject: [EquisMetaStock Group] Need help with formula
> Hello, I've come across this formula for Renko charts adjusted by
> ATR. However, my metastock coding skills are rudimentary, so I'm
> not sure how to solve this problem. If I read the manual correctly
> the If statement is only binary in function, meaning for one If
> statement there is one true/false outcome. In the code below, there
> are multiple computation within an If statement, folloed by and End
> statement. How could this be coded properly in metatock. Your
> help would be greatly appreciated.
>
> TIA,
> Gernot
>
> Inputs: K(1),
> Smooth(10);
>
> vars:Brick(0), DN(0), UP(0), BricksUp(0), BricksDn(0);
> Value1 = ATR(Smooth);
>
> If BarNumber = 1 Then Begin
> Up = H;
> Dn = L;
> Brick = K*(H - L);
> End;
> If BarNumber > 1 then begin
> If C > UP + Brick Then begin
> BricksUp = IF(Brick = 0, 0, Floor((C - Up)/Brick)*Brick);
> UP = Up + BricksUp;
> Brick = K*Value1;
> DN = Up - Brick;
> BricksDn = 0;
> End;
> If C < Dn - Brick Then begin
> BricksDn = IF(Brick = 0, 0, Floor((Dn - C)/Brick)*Brick);
> Dn = Dn - BricksDn;
> Brick = K*Value1;
> Up = Dn + Brick;
> BricksUp = 0;
> End;
> End;
>
> Plot1(UP, "Up");
> Plot2(DN, "Dn");
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|