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

[amibroker] Limit Trade Size



PureBytes Links

Trading Reference Links

2 things should be able to remove the excess signals

Equity(1)
1 : works as 0 but additionally updates buy/sell/short/cover arrays so all
redundant signals are removed exactly as it is done internally by the
backtester plus all exits by stops are applied so it is now possible to
visualise ApplyStop() stops.

Exrem
SYNTAX 
exrem( ARRAY1, ARRAY2 ) 
RETURNS
ARRAY 
FUNCTION 
removes excessive signals:
returns 1 on the first occurence of "true" signal in Array1
then returns 0 until Array2 is true even if there are "true" signals in
Array1 
EXAMPLE
buy = ExRem( buy, sell );
sell = ExRem( sell, buy ); 

You can also try this, I recall sending this (or similar) to someone
recently

xyz = flip( buysignal , sell);
buy = xyz and ref(xyz,-1)==0;





Cheers,
Graham
http://e-wire.net.au/~eb_kavan/ 
-----Original Message-----
From: Collectable Images [mailto:telecard@xxxxxxxxxxxxxx] 
Sent: Monday, July 05, 2004 4:40 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Not selling at correct time?

Graham,

this is what the help files say about the valuewhen function.

valuewhen(EXPRESSION, ARRAY, n = 1) 
RETURNS ARRAY 
FUNCTION  Returns the value of the ARRAY when the EXPRESSION was true on the
n -th most recent occurrence. Note: this function allows also 0 and negative
values for n - this enables referencing future  
 
So looks like it will not Remember the correct signal from the Buy day,
seems like it remembers all othe rbuy signals generated inbetween the Real
BUy and the real Sell signals.
 
Their must be something simple that remembers the price from the buy day. 


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
ADVERTISEMENT





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 the Yahoo! Terms of Service. 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/