Re[2]: [amibroker] About "Out of present range" OLE errorIf you are using 
external JScript, you can use

try 
{

}
catch( e )
{

}

to catch any run-time error on JScript side.

Best regards,
Tomasz Janeczko
amibroker.com
  ----- Original Message ----- 
  From: Herman 
  To: [email protected] 
  Sent: Sunday, November 30, 2008 5:27 PM
  Subject: Re[2]: [amibroker] About "Out of present range" OLE error


  This error is a real pain to work around... it hardly ever occurs at the same 
time, sometimes the code works fine for a week and then it occurs again in the 
middle of an 30 minute procedure. I inspected my JScript-log and all the 
arguments for all AmiBroker OLE calls look good. I suspect the error occurs 
when the AA encounters a ticker that has bad data for a specific date-argument.




  I test over 1000 tickers and I cannot predict combinations of portfolio 
composition, ticker selection, and trades. Also I don't want to exclude a 
ticker just because it has a few bad data.  




  Does anyone have any suggestions?




  herman







  Monday, November 17, 2008, 6:06:18 PM, you wrote:




  > Hello,




  > A little bit more background:




  > Here is Microsoft link describing the innner workings.

  > When you pass arguments to OLE function, Windows is often converting

  > types using VariantChangeType function




  > http://msdn.microsoft.com/en-us/library/ms221258.aspx




  > The funciton can fail with number of errors and one of them is

  > DISP_E_OVERFLOW (0x8002000A) that shows up as "Out of present range"




  > As per Microsoft docs it means that the result of the conversion does

  > not fit in the destination type.




  > Best regards,

  > Tomasz Janeczko

  > amibroker.com

  > ----- Original Message ----- 

  > From: "Tomasz Janeczko" <[EMAIL PROTECTED]>

  > To: <[email protected]>

  > Sent: Monday, November 17, 2008 11:56 PM

  > Subject: [amibroker] About "Out of present range" OLE error







  >> Hello,




  >> "Out of present range" is the error generated by Microsoft OLE library, 
when

  >> you call a method with a parameter that is outside of correct range.

  >> This is generic OLE error that occurs at system library level when OLE is 
passing values

  >> from the caller to callee.

  >> For example, when you specify negative number for parameter that is 
unsigned integer,

  >> or you specify array/collection element by item and that item does not 
exist.

  >> For example you may be specifying non-existing watch list, or non-existing

  >> signal, etc.

  >> It may also occur when you attempt to assign string to OLE 
variable/property parameter of

  >> date or currency type and string to date or string to currency conversion 
fails.

  >> The failure in string to date conversion can occur if for example the 
specified string

  >> does not follow specified locale (Windows control panel) or is ambigious 
or leads

  >> to non-existing date, such as 13/01/01 when system date format is MM/DD/YY.




  >> Best regards,

  >> Tomasz Janeczko

  >> amibroker.com




  >> ------------------------------------




  >> **** IMPORTANT ****

  >> This group is for the discussion between users only.

  >> This is *NOT* technical support channel.




  >> *********************

  >> TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 

  >> SUPPORT {at} amibroker.com

  >> *********************




  >> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:

  >> http://www.amibroker.com/devlog/




  >> For other support material please check also:

  >> http://www.amibroker.com/support.html




  >> *********************************

  >> Yahoo! Groups Links













  > ------------------------------------




  > **** IMPORTANT ****

  > This group is for the discussion between users only.

  > This is *NOT* technical support channel.




  > *********************

  > TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to

  > SUPPORT {at} amibroker.com

  > *********************




  > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:

  > http://www.amibroker.com/devlog/




  > For other support material please check also:

  > http://www.amibroker.com/support.html




  > *********************************

  > Yahoo! Groups Links




  >     http://groups.yahoo.com/group/amibroker/




  >     Individual Email | Traditional




  >     http://groups.yahoo.com/group/amibroker/join

  >     (Yahoo! ID required)




  >     mailto:[EMAIL PROTECTED] 

  >     mailto:[EMAIL PROTECTED]




  >     [EMAIL PROTECTED]




  >     http://docs.yahoo.com/info/terms/







   

Reply via email to