PureBytes Links
Trading Reference Links
|
Sorry I haven't got back to you sooner. I've just had time this morning to
look at what you sent. Thanks. I'm trying to decifer what you have sent.
>From what I have seen so far it's a lot closer than what I had but still
needs some tweeking. It appears that in not all cases does it recalculate
properly the highest high since the buy was triggered. I'll try and forward
more information once I take a closer look.
thanks again,
I'll get you something as soon as I can but I'm on vacation the next week
starting tommorrow so it will be probably later next week.
Ed Middleton
-----Original Message-----
From: wander@xxxxxxxx <wander@xxxxxxxx>
To: metastock@xxxxxxxxxxxxx <metastock@xxxxxxxxxxxxx>
Date: Tuesday, June 01, 1999 7:47 PM
Subject: Re: Multiple buy signals
> You did say Monday, not first trading day. See if this does it.
>
> ==Indicator==
> {Plots 1 for buys}
>n:=Input("% of high to trail stop:",91,99,98);
>Mon:=DayOfWeek()=1;
>
> {Highest High Since Monday}
>hhsMon:=HighestSince(1,Mon,H);
>
> {Trail Stop Calc 1}
>TScalc1:=hhsMon*n/100;
>
> {Exit Calc 1}
>exitCalc1:=L{C}<TScalc1;
>
>BuyCalc1:=If(Mon AND
> BarsSince(Ref(exitCalc1,-1))<=
> BarsSince(Ref(Mon,-1)),1,0);
>hhsBC1:=HighestSince(1,BuyCalc1,H);
>TS:=hhsBC1*n/100;
>exit:=L{C}<TS;
>Buy:=If(Mon AND
> BarsSince(Ref(exit,-1))<=
> BarsSince(Ref(Mon,-1)),1,0);
>Buy;
>------------------------
>
> ==Indicator==
>
> --{Plots Monday-only-Buy trailing stop and highest high}--
>
>n:=Input("% of high to trail stop:",91,99,98);
>Mon:=DayOfWeek()=1;
>
> {Highest High Since Monday}
>hhsMon:=HighestSince(1,Mon,H);
>
> {Trail Stop Calc 1}
>TScalc1:=hhsMon*n/100;
>
> {Exit Calc 1}
>exitCalc1:=L{C}<TScalc1;
>
> {Buy Calc 1}
>BuyCalc1:=If(Mon AND
> BarsSince(Ref(exitCalc1,-1))<=
> BarsSince(Ref(Mon,-1)),1,0);
>hhsBC1:=HighestSince(1,BuyCalc1,H);
>TS:=hhsBC1*n/100;
>TS;
>hhsBC1;
>
>------------------------
>
> ======Test=========
>
>==ENTER LONG:==
>Mon:=DayOfWeek()=1;
>
> {Highest High Since Monday}
>hhsMon:=HighestSince(1,Mon,H);
>
> {Trail Stop Calc 1}
>TScalc1:=hhsMon*opt1;
>
> {Exit Calc 1}
>exitCalc1:=L<TScalc1;
>BuyCalc1:=If(Mon AND
> BarsSince(Ref(exitCalc1,-1))<
> BarsSince(Ref(Mon,-1)),1,0);
>hhsBC1:=HighestSince(1,BuyCalc1,H);
>TS:=hhsBC1*opt1;
>exit:=L<TS;
>Buy:=If(Mon AND
> BarsSince(Ref(exit,-1))<
> BarsSince(Ref(Mon,-1)),1,0);
>Buy;
>
>----------------------------
>-------------------------
>
>==CLOSE LONG:==
>Mon:=DayOfWeek()=1;
>
> {Highest High Since Monday}
>hhsMon:=HighestSince(1,Mon,H);
>
> {Trail Stop Calc 1}
>TScalc1:=hhsMon*opt1;
>
> {Exit Calc 1}
>exitCalc1:=L<TScalc1;
>BuyCalc1:=If(Mon AND
> BarsSince(Ref(exitCalc1,-1))<
> BarsSince(Ref(Mon,-1)),1,0);
>hhsBC1:=HighestSince(1,BuyCalc1,H);
>TS:=hhsBC1*opt1;
>exit:=L<TS;
>exit;
>
>
>
>
|