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

Re: [Metastockusers] barssince() problem



PureBytes Links

Trading Reference Links

Eric

You need a simple latch. Create this indicator and drop it on your chart
unscaled. It will display a pattern like the one below if the courier font
doesn't get killed in sending. Study how this works and you have your
solution. Substitute your own entry and exit signals and see what you think.

Roy

  {Exercise 4} {signal timing for a simple latch}

Set:=Cross(Mov(C,15,E),Mov(C,25,E)); Set+3.75;

Reset:=Cross(Mov(C,25,E),Mov(C,15,E)); Reset+2.5;

Init:=Cum(Set+Reset>-1)=1; Init+1.25;

Trade:=BarsSince(Init OR Set)<BarsSince(Init OR Reset);

Trade;





_____/  \_____/\_______________/ \______ Set

                         __

N/A    ___/\____________/  \________/\__ Reset



N/A    \________________________________ Init

               _________        ____

N/A    _______/         \______/    \___ Trade









----- Original Message ----- 
From: "rans rundize" <happylifecanada@xxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Cc: <Metastockusers-owner@xxxxxxxxxxxxxxx>
Sent: Monday, November 17, 2003 7:43 PM
Subject: [Metastockusers] barssince() problem


> Dear all,
>
> I use barssince function to count the number of periods passed since the
last buy order is true. The problem is before the  next sell order is true,
there could be a chance to have another buy order condition true generated
but is ignored before the next sell order is genreated  because I choose
only one open position at all time. But the barsince() function is changed
accroding to the second buy order not first. I want the number of periods
passed since the first buy order. That is if there is a open order available
but before the sell order is gernerated, any new buy order will be ingored
by the barssince() function.  How to do it?  I really appreciated.
>
> best regards,
>
> Eric
>
>
> ---------------------------------
> Do you Yahoo!?
> Protect your identity with Yahoo! Mail AddressGuard



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

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