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

[amibroker] logic to determine position



PureBytes Links

Trading Reference Links

Here is where I need some help.  I need a way to determine whether I 
currently have a long / short / out position in a stock.

The only thing I can figure is to use "barssince" buy condition or sell 
condition and test the value of barssince.  Does anyone know 
what  value  barssince takes if the array  is false.  ie: barssince(buy) 
where buy is false.  Is it zero, NAN, or some large negative number?

That is my poor attempt at the logic...what are you guys using to determine 
what the current position is when working in the middle of a script.

My context would be: If I am long I want to impose a filter that would NOT 
be used if I am out or short.  Eg: exit long if price crosses under an MA, 
but do not use an MA test to determine entries.

TIA
Sid

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Save on Coral Calcium. Get Better Health and
Stronger Bones. Seen on TV
http://www.challengerone.com/t/l.asp?cid-2805&lp=calcium2.asp
http://us.click.yahoo.com/9gf46B/EfUGAA/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/ 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.493 / Virus Database: 292 - Release Date: 6/25/2003