PureBytes Links
Trading Reference Links
|
Often this doesn't have any consequence, however you can use While ExRem()
and Equity(1) clean up redundant signals.
In complicated code you may want to keep track of the position you are in.
You can do this using the Flip():
Longposition = flip(buy,sell); // LongPosition == 1 when you are long
ShortPosition = flip(short,cover); // ShortPosition == 1 when you are short
This way you can keep other than reserved signals (Buy, Sell, etc.) equal to
zero when in either position. For example:
Var1 = Var2 * LongPosition; // Var1 can only assume the value of Var2 when
in a long position, this is similar to:
Var1 = IIF(LongPosition, Var2, 0 );
herman
-----Original Message-----
From: emarco [mailto:emarco@xxxxxxxxxxxxxxx]
Sent: Tuesday, June 10, 2003 11:04 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] developing system
my problem is that my sell condition keeps giving me sell signals after the
long position is closed.
See picture attached.
How can I restrict this. (after close position, stop giving sell signals).
Thanks
Juan
----- Original Message -----
From: "Owen Davies" <owen5819@xxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, June 10, 2003 10:34 PM
Subject: Re: [amibroker] developing system
> emarco asked for help with:
>
> > Buy = IIf(Cross(ADX(14),20) AND PDI(14)>MDI(14),1,0); (etc.)
>
> Get rid of the IIf() functions. "Buy=Cross(...". And so on.
>
> Owen Davies
>
>
>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|