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

RE: [amibroker] Com Object Help



PureBytes Links

Trading Reference Links




Here's 
an example for you to experiment with:
<SPAN 
class=734391823-15102003> 
    ' for 
setting AB to run the AFL below    Const 
cstAB_ApplyTo_AllStocks = 0    Const 
cstAB_ApplyTo_CurrentStock = 1    Const 
cstAB_ApplyTo_UseFilter = 2
 
    ' for AB 
range settings    Const cstAB_Range_AllQuotes = 
0    Const cstAB_Range_NLastQuotes = 1    
Const cstAB_Range_NLastDays = 2    Const 
cstAB_Range_FromToDtes = 3
 
    dim 
AB               
As Object ' late binding    dim 
AA               
As Object
 
    Set AB = 
CreateObject("Broker.Application")    Set AA = 
AB.Analysis
 
    If 
AB.LoadDatabase(CStr(varDBPath)) 
Then        with 
AA            
.ApplyTo = cstAB_ApplyTo_UseFilter  
            
.RangeMode = 
cstAB_Range_FromToDtes            
If intRangeSetting = cstAB_Range_FromToDtes 
Then                
.RangeFromDate = 
datFrom                
.RangeToDate = 
datTo            
Else                
.RangeN = 
intN            End 
If            
.ClearFilters            
.Filter(0, "watchlist") = 
intWatchList            
If .LoadFormula(strFormulaPath) 
Then                
.Scan   ' or .Optimize or .Explore or 
.BackTest                
if Not AA.Export(strExportPath) 
then                    
msgbox "Export 
Failure"                
End If    
            
else                
msgbox "Formula Load 
Error"            End 
If          end 
With        
else        msgbox "Database 
Error"    End If    
 
    Set AA = 
Nothing    Set AB = Nothing
<FONT face="Courier New" color=#0000ff 
size=2>HTH 
<FONT face="Courier New" color=#0000ff 
size=2> 
<FONT face="Courier New" color=#0000ff 
size=2>d

  
  <FONT 
  face=Tahoma size=2>-----Original Message-----From: stefano dotti 
  [mailto:031056@xxxxxxxxx] Sent: Wednesday, October 15, 2003 6:58 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Com 
  Object HelpHi to All,I'm searching the rule to 
  export into Visual Basic the result of scan function.The AlertIF function 
  is good for send e-mail, but for pass thisinformation to another 
  program  ?Through com object is possible read the result of 
  scan?Thanks in advance-- Best 
  regards,StefanoSend 
  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


  ADVERTISEMENT 









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.