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

RE: [amibroker] Portfolio Backtester & Watchlist - Help required



PureBytes Links

Trading Reference Links




I am trying to fill in the first set of bars with 
the first calculated value. The blocks are in 260bars and for the rest of the 
chart it refers to the last value when it was a multiple fo 260. but I get the 
first 159 bars returning a null value.I guess I am doing something basically 
wrong, but it is always the simplest things that I am unable to find. Here is my 
code
Period = <FONT face="Courier New" color=#ff00ff 
size=2>260;
Range = HHV<FONT 
size=2>(H,Period) - 
LLV(<FONT 
color=#ff0000 size=2>L,Period);
Mean = (HHV<FONT 
size=2>(H,Period) 
+ <FONT 
color=#0000ff size=2>LLV(<FONT color=#ff0000 
size=2>L,Period))/<FONT color=#ff00ff 
size=2>2;
Movement = Range/Mean * <FONT color=#ff00ff 
size=2>100;
Percent = Movement / 3<FONT 
size=2>;
PeriodPercent = IIf<FONT 
size=2>( <FONT color=#0000ff 
size=2>Cum(<FONT color=#ff00ff 
size=2>1)<Period, <FONT color=#0000ff 
size=2>ValueWhen(<FONT color=#0000ff 
size=2>Cum(<FONT color=#ff00ff 
size=2>1)<FONT face="Courier New" 
size=2>==Period, Percent<FONT face="Courier New" 
size=2>, <FONT face="Courier New" color=#ff00ff 
size=2>0), <FONT color=#0000ff 
size=2>ValueWhen(<FONT color=#0000ff 
size=2>Cum(<FONT color=#ff00ff 
size=2>1)<FONT face="Courier New" 
size=2>%Period == <FONT color=#ff00ff 
size=2>0, Percent)<FONT face="Courier New" 
size=2> );<FONT face="Courier New" 
color=#ff0000 size=2>
Filter=<FONT 
face="Courier New" color=#ff00ff size=2>1<FONT face="Courier New" 
size=2>;
AddColumn(<FONT 
face="Courier New" color=#0000ff size=2>Cum<FONT face="Courier New" 
size=2>(<FONT face="Courier New" color=#ff00ff 
size=2>1),<FONT 
face="Courier New" color=#8b0000 size=2>"Bars"<FONT 
face="Courier New" size=2>,<FONT face="Courier New" color=#ff00ff 
size=2>1);<FONT 
face="Courier New" color=#0000ff size=2>
AddColumn(<FONT 
size=2>PeriodPercent, 
"PerPc"<FONT 
face="Courier New" size=2>, <FONT face="Courier New" color=#ff00ff 
size=2>1);
TIA for any help<FONT 
size=3>Cheers,Graham<A 
href="">http://groups.msn.com/asxsharetrading<A 
href="">http://groups.msn.com/fmsaustralia 



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