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

RE: [amibroker] COM Object Statement Works One Place but Not another



PureBytes Links

Trading Reference Links

The picture shows side by side of two formulas.  The one on the right passes
syntax and runs.  The one on the left is copied from the one on the right
and shows the error message from check Syntax.  Marks suggestion to "ignore"
and just run it does not fly because it will not run.  
 
Another difference is the one on the right applies the procedure thru a lopp
driven off of a for statement (you can see the top of the loop in lower
right pane).  In the one on the left, I just needed one ATC so just have a
normal ATC statement below the procedure code.  Hmmmm.  I copied the entire
code from the right (copied at bottom of this message). No syntax error.  I
then copied just the ATC statement and Sym and SymName above the loop, and
get the error.  What is going on with the loop that avoids the error if the
procedure call is within the for loop?
 
The solution seems to be to provide a loop to call the procedure, but why is
this needed.......?
 
ken
 


  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of dingo
Sent: Monday, August 14, 2006 11:41 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] COM Object Statement Works One Place but Not
another


are you absolutely positive that these 2 statements were in the original and
that they didn't give you an error?
 
   cs        = AB.Stocks(Sym) ;                      
   cs.FullName = SymName          ;                 <<<<<<<<<<<<<<< Error in
this statement ***

the problem is that cs is a variable that contains the ticker taken from the
object AB.Stocks(sym).
 
Then you try to use cs as an object in cs.FullName and it isn't.
 
Hard to believe that it worked.  Did the original pass the syntax checker?
 
d