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

Re: [amibroker] Re: Portfolio Trading vs Buy&Hold comparison



PureBytes Links

Trading Reference Links

A couple of different ways
You could use valuewhen(V!=0,buy)

But I think we would need to see your whole code to get a full idea of how
it works, and how you have produced it. Could just be  simple change is
required.

Cheers,
Graham
http://groups.msn.com/asxsharetrading
http://groups.msn.com/fmsaustralia 

-----Original Message-----
From: Glenn [mailto:glennokb@xxxxxxxxxxxx] 
Sent: Wednesday, 14 January 2004 6:11 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: No Data Days?


Hi Graham,

Thanks for your reply.

This doesn't work: Buy = Iif(v==0, ref(buy,-1),buy);

I tried this too: Buy = Iif(IsEmpty(v), ref(buy,-1),buy); ...but doesn't
work either.

If I remove the Index filter the Buy signals do appear and I'm sure the 
problem is that there is no data on the exact same day that the index 
filter changed to a "1".

I really don't understand about arrays and using flip() but I think that the

array of my Index filter needs calculating independently of the stock data 
in case there is no data for some of days in the stock. Is this possible in 
Amibroker?

The main problem is in backtesting as I know day to day the state of this 
index filter with a separate chart.

Thanks.

Cheers Glenn


--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> 
wrote:
> Glen you could try this after your buy condition statement and the 
> flip statement
> 
> Buy = Iif(v==0, ref(buy,-1),buy);
> 
> Cheers,
> Graham
> http://groups.msn.com/asxsharetrading
> http://groups.msn.com/fmsaustralia
> 
> -----Original Message-----
> From: Glenn [mailto:glennokb@x...]
> Sent: Tuesday, 13 January 2004 2:51 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] No Data Days?
> 
> 
> Hi,
> 
> I have a binary Index filter that is a ONE (Buy) or ZERO (Do not Buy)
> using Flip() that I use to tell me when to buy or stand aside from 
> trading stocks.
> 
> If there is no data for a stock on the date when a ONE (Buy) occures
> then following bars also don't have Buy signals.
> 
> Is there a way to have the Buy signal occur in following bars until a
> ZERO occurs when there is no data on the day that the Index filter 
> indicates a Buy?
> 
> Cheers Glenn


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 

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/ 


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 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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/