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

[amibroker] Inconsistant explore results using AddToComposite



PureBytes Links

Trading Reference Links




Hello Walt,
 
just try this code:
<FONT face="Courier New" color=#009300 
size=1>
// Buy = Sell = 0 is equal to false and does therefore never execute in 
reality! For this reason, I commented them out:
// buy = 0;
// sell = 0;<FONT 
face="Courier New" color=#009300 size=1>
// Replace the aforementioned buy/sell conditions with the following 
ones:
buy = <FONT 
face="Courier New" color=#800080 size=1>Ref<FONT face="Courier New" 
size=1>(<FONT face="Courier New" color=#800080 
size=1>RSI(<FONT 
face="Courier New" color=#ff00ff size=1>14<FONT face="Courier New" 
size=1>),-1<FONT 
face="Courier New" size=1>) < <FONT face="Courier New" color=#ff00ff 
size=1>30 <FONT 
face="Courier New" color=#ff6820 size=1>AND<FONT face="Courier New" 
size=1> <FONT face="Courier New" color=#800080 
size=1>RSI(<FONT 
face="Courier New" color=#ff00ff size=1>14<FONT face="Courier New" 
size=1>) >= <FONT face="Courier New" color=#ff00ff 
size=1>30;<FONT 
face="Courier New" color=#ff6820 size=1>
sell = <FONT 
face="Courier New" color=#800080 size=1>Ref<FONT face="Courier New" 
size=1>(<FONT face="Courier New" color=#800080 
size=1>RSI(<FONT 
face="Courier New" color=#ff00ff size=1>14<FONT face="Courier New" 
size=1>),-1<FONT 
face="Courier New" size=1>) > <FONT face="Courier New" color=#ff00ff 
size=1>70 <FONT 
face="Courier New" color=#ff6820 size=1>AND<FONT face="Courier New" 
size=1> <FONT face="Courier New" color=#800080 
size=1>RSI(<FONT 
face="Courier New" color=#ff00ff size=1>14<FONT face="Courier New" 
size=1>) <= <FONT face="Courier New" color=#ff00ff 
size=1>70;<FONT 
face="Courier New" color=#ff6820 size=1>
filter = <FONT 
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New" 
size=1>;
RSIList = <FONT face="Courier New" color=#800080 
size=1>RSI(<FONT 
face="Courier New" color=#ff00ff size=1>14<FONT face="Courier New" 
size=1>);
AddColumn( <FONT 
face="Courier New" color=#800080 size=1>RSI<FONT face="Courier New" 
size=1>(14<FONT 
face="Courier New" size=1>) ,<FONT face="Courier New" color=#0000ff 
size=1>"none",<FONT 
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New" 
size=1>);
AddToComposite<FONT face="Courier New" 
size=1>(RSIList/<FONT face="Courier New" color=#ff00ff 
size=1>5, <FONT face="Courier New" 
color=#0000ff size=1>"~RSI", <FONT 
face="Courier New" color=#0000ff size=1>"X"<FONT face="Courier New" 
size=1>,23<FONT 
face="Courier New" size=1> );
It should produce buying and selling 
results.
 
Best regards,
 
Udo
 
<BLOCKQUOTE 
>
  -----Ursprüngliche Nachricht----- 
  <DIV 
  >Von: 
  <A title=WSCHWARZ@xxxxxxxxxxxxx 
  href="">hairy_mug 
  An: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Gesendet: Donnerstag, den 29. Mai 2003 
  05:00 Uhr
  Betreff: [amibroker] inconsistant explore 
  results using addToComposite
  In the latest Beta version, the following code does not 
  seem to do what I 
  expect:Buy=0;Sell=0;Filter=1;AddColumn( RSI(14) 
  ,"none",1);RSIList=RSI(14);AddToComposite(RSIList/5, "~rsi", "X",23 
  );I have a filter with 5 stocks and a 1 day date range.After the 
  scan, my result column is as expected; 5 stocks wtih RSI 
  values.BUT, The composite "~rsi" plot has many more entries with 
  the 5 values"sprinkled-in" with no discernable pattern or 
  frequency.NOTE: I realized that the scan is run once for every stock, 
  hence the "rsiList/5" to get the correct values in the 
  composite.If there is a better way, not using scripting (I'm forcing 
  myself to learn Amibroker), please point me in the right 
  direction...Thanks in advance for any 
  help!                    
  WaltSend 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












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



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.