| 
 PureBytes Links 
Trading Reference Links 
 | 
In many cases, after your definition of the raw Buy and Sell signals you can
create a position array like so:
LongPosition = Flip(Buy,Sell);
ShortPosition = Flip(Short,Cover);
You can update these arrays each time you change the signals by repeating
these statements, for example after an ApplyStop().
best regards,
herman
  -----Original Message-----
  From: micmus2002 [mailto:micmus2002@xxxxxxxxx]
  Sent: Monday, October 04, 2004 10:34 PM
  To: amibroker@xxxxxxxxxxxxxxx
  Subject: [amibroker] How do you know what your last trade was
  I want to write stop logic, but since its based on a logical test I
  cannot seem to use the applystop function.
  Therefore  it seems I will need to have another Cover /Sell statement
  which will only be triggered if I already have an opposite position.
  i.e. Cover if am already Short and my stop condition is true, and
  Sell if I am already long and that stop position is true.
  This means I need to know what my current position is, and my
  question is how do I do this. I know Wealthlab has a Position Array
  but I can't find anything similar in AB.
  I am sure there must be a way to do this. Would be grateful if
  someone could provide the code.
  Thanks
  Check AmiBroker web page at:
  http://www.amibroker.com/
  Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
        Yahoo! Groups Sponsor
                 Select Your
State:AlabamaAlaskaArkansasArizonaCaliforniaColoradoConnecticutDelawareFlori
daGeorgiaHawaiiIdahoIllinoisIndianaIowaKansasKentuckyLouisianaMaineMarylandM
assachusettsMichiganMinnesotaMissippiMissouriMontanaNebraskaNevadaNew
HampshireNew MexicoNew JerseyNew YorkNorth CarolinaNorth
DakotaOklahomaOhioOregonPennsylvaniaRhode IslandSouth CarolinaSouth
DakotaTennesseeTexasUtahVermontVirginiaWashingtonWashington D.C.West
VirginiaWisconsinWyoming
                 PurchaseRefinance
----------------------------------------------------------------------------
--
  Yahoo! Groups Links
    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/
    b.. To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links
<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
 |