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

[amibroker] data providers (was New feature in VectorVest)



PureBytes Links

Trading Reference Links

Graham,


I think I have found what is wrong. The code valuewhen looks back from where
it is at teh time and my ocde wanted a 300% profit (which I did not expect
to occur but that kept the trade live and eventually another buy signal
occured but exrem(buy, sell) did not remove it entirely. It did not show on
the chart but when the valuewhen code was past this point it now referenced
the second buy signal as the current one and so exited on cond5 based on
this incorrect Buy signal.

I need tto have code that remembers the correct Buy so unable to use
valuewhen since the referneces the whne from future date and after a secind
buy signal I would need to put a 2 in the valuewhen line rather tahan a 1.

If, I could count the buys and then I put that variable in the valuewhen
line it would work.

Don

-----Original Message-----
From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx]
Sent: Monday, 5 July 2004 6:54 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Not selling at correct time?


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.




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







------------------------ 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/