PureBytes Links
Trading Reference Links
|
Some of the original MS code lines are getting broken up by Yahoo text
formatting. Try this code:
---8<-----------------
{ Original code by Rodney }
{ Plot in own window }
RSSwing:=
Reaction() AND Ref(Rally(),-1);
RallyHi:=ValueWhen(1,Rally(),H);
RISwing:=
ValueWhen(1,RSSwing,RallyHi)
<ValueWhen(2,RSSwing,RallyHi)
AND ValueWhen(2,RSSwing,RallyHi)
>ValueWhen(3,RSSwing,RallyHi)
AND RSSwing;
SwingHi:=ValueWhen(2,RISwing,H);
RLSwing:=
ValueWhen(1,RISwing,SwingHi)
<ValueWhen(2,RISwing,SwingHi)
AND ValueWhen(2,RISwing,SwingHi)
>ValueWhen(3,RISwing,SwingHi)
AND RISwing;
SSSwing:=
Rally() AND Ref(Reaction(),-1);
ReactionLo:=
ValueWhen(1,Reaction(),L);
SISwing:=
ValueWhen(1,SSSwing,ReactionLo)
>ValueWhen(2,SSSwing,ReactionLo)
AND ValueWhen(2,SSSwing,ReactionLo)
<ValueWhen(3,SSSwing,ReactionLo)
AND SSSwing;
SwingLo:=ValueWhen(2,SISwing,L);
SLSwing:=
ValueWhen(1,SISwing,SwingLo)
<ValueWhen(2,SISwing,SwingLo)
AND ValueWhen(2,SISwing,SwingLo)
>ValueWhen(3,SISwing,SwingLo)
AND SISwing;
RSSwing;RISwing*2;RLSwing*3;
-SSSwing;-SISwing*2;-SLSwing*3
---8<-----------------
jose '-)
--- In equismetastock@xxxxxxxxxxxxxxx, GH LEE <ghl89882020@xxxx>
wrote:
> Hi Rodney,
> Your code is not functioning,can you or anyone assist me
>
> from:ghlee
>
> platt_rodney <platt_rodney@xxxx> wrote:
>
>
> Good Day All
> I was reading Larry Williams Book "Long Term Secrets to short term
> trading". In the first chapter he describes Short, Intermediate and
> long Term swing. This had me intrigued so "tried" to code this up in
> metastock and is as follows:-.
>
> I was wounding if anyone here that knows Larry's concept of swing
> could have a look at this code and see if I got it completely wrong
> or if you have any suggestions.
>
> Note: I'm only a newbie to metastock and this is a fast and rough
> fist go. all it dose is plot a 1 on the last bar for short-term
> highs, -1 on the last bar for short- term lows, 2 on the last bar
> for intermediate-term highs, -2 on the last bar for intermediate-
> term lows, 3 on the last bar for long-term Highs and a -3 on the
> last bar for long-term lows as per Larry's book. You know not
> counting outside, inside day and so on.
>
> Code Start -->
>
> RSSwing:=Reaction() AND Ref(Rally(),-1);
>
> RISwing:=(ValueWhen(1,RSSwing,ValueWhen(1,Rally(),HIGH)) < ValueWhen
> (2,RSSwing,ValueWhen(1,Rally(),HIGH)) AND ValueWhen
> (2,RSSwing,ValueWhen(1,Rally(),HIGH)) > ValueWhen(3,RSSwing,
ValueWhen
> (1,Rally(),HIGH))) AND RSSwing;
>
> RLSwing:=(ValueWhen(1,RISwing,ValueWhen(2,RISwing,HIGH)) < ValueWhen
> (2,RISwing,ValueWhen(2,RISwing,HIGH)) AND ValueWhen
> (2,RISwing,ValueWhen(2,RISwing,HIGH)) > ValueWhen(3,RISwing,
ValueWhen
> (2,RISwing,HIGH))) AND RISwing;
>
> SSSwing:=Rally() AND Ref(Reaction(),-1);
>
> SISwing:=(ValueWhen(1,SSSwing,ValueWhen(1,Reaction(),LOW)) >
> ValueWhen(2,SSSwing,ValueWhen(1,Reaction(),LOW)) AND ValueWhen
> (2,SSSwing,ValueWhen(1,Reaction(),LOW)) < ValueWhen
> (3,SSSwing,ValueWhen(1,Reaction(),LOW))) AND SSSwing;
>
> SLSwing:=(ValueWhen(1,SISwing,ValueWhen(2,SISwing,LOW)) < ValueWhen
> (2,SISwing,ValueWhen(2,SISwing,LOW)) AND ValueWhen
> (2,SISwing,ValueWhen(2,SISwing,LOW)) > ValueWhen(3,SISwing,ValueWhen
> (2,SISwing,LOW))) AND SISwing;
>
> RSSwing;
> RISwing * 2;
> RLSwing * 3;
> 0 - SSSwing;
> 0 - SISwing * 2;
> 0 - SLSwing * 3;
>
> <-- Code End.
> Note: I have and only have had Metastock ver9.0 so I do not know if
> some of those function work with earlier versions.
>
> Regards,
> Rodney
------------------------ 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/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/
|