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

[amibroker] How to "Error Trap" in Automatic Analysis?


  • To: <amibroker@xxxxxxxxxxxxxxx>
  • Subject: [amibroker] How to "Error Trap" in Automatic Analysis?
  • From: "Ken Close" <ken45140@xxxxxxxxx>
  • Date: Mon, 18 Aug 2008 07:11:27 -0400
  • Authentication-results: gwout2 smtp.user=ksclose; auth=pass (LOGIN)

PureBytes Links

Trading Reference Links

I do not recall this being discussed (but of course I forget lots of past messages).
 
In making some code to be run in AA by an inexperienced AB user, I want to error trap some situations that are likely to be encountered and then give a message to the user instead of the program dropping into the Formula Editor with a yellow line on the offending line. 
 
In general, is it possible?
 
I realize the answer is to set up the program to avoid every situation where the error might occur.
 
In my case, I have a subscripted formula in a loop which will yield a "subscript out of range" if the current symbol contains less days of data than the Parameters are set for.
 
I set a startdate, calculate a "FirstBar" for the range that is set, and then use a "FirstBar - 1" subscript, which works fine if the calculated FirstBar is always greater than the actual first bar.  If the data does not exist earlier than the date set for FirstBar, then the error pops up.
 
Thus my question:  is it possible to sense the error condition and display an error message of the users choosing?
 
The less elegant way is to instruct the user that if they see a yellow line in the Formula Editor, to check that the FirstBar date is set at or after the beginning of the shortest data symbol.
 
Comments?
 
Ken
__._,_.___

Please note that this group is for discussion between users only.

To get 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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___