"CBOE Put/Call Ratio" and Strategy Monitor Error(4)
Author: giorgos
Creation Date: 7/6/2011 11:47 PM
profile picture

giorgos

#1
When I run the Strategy Name: ActiveTrader 10-2007 | CBOE Put/Call Ratio [Revised], in Strategy Monitor I get "Error(4); Abort Staement Executed".Is there something I can do so it will run correctly
profile picture

Eugene

#2
Particular published strategies and their problems should be discussed in their own forums. Next time, please go to "Strategies and Trading", find the strategy, click on "n Discussions" link and you're in the right place.

1. You might not have the CBOE provider installed?
2. If so, the CBOE DataSet wasn't created and updated? The symbol TOTALPC (which is the basis of the strategy) isn't present, and that triggers an Abort statement request exactly as coded in the Strategy.
3. Also, make sure that the CBOE data is up to date.
profile picture

giorgos

#3
CBOE is installed and updated and the Strategy runs just fine when backtesting. The problem occurs only when running in Strategy Monitor
profile picture

Eugene

#4
Which bar scale and data loading range are you using? If it is Daily then...

How many symbols are in the DataSet?
Does this error affects all symbols or some of them?
Could you right-click on the Strategy and enable logging, then after execution copy and paste it here?
profile picture

giorgos

#5
There are 12symbols in the data set.I have run it also with one, Varied the daily scale from 1000 to 2500 all give the same error.

7/7/2011 11:41:34 AM: Thread Execute
7/7/2011 11:41:39 AM: Performing batch update for DIA,
7/7/2011 11:41:39 AM: Calling UpdateDataSource
7/7/2011 11:41:39 AM: DIA is current
7/7/2011 11:41:39 AM: Creating Executor
7/7/2011 11:41:39 AM: Executing: DIA
7/7/2011 11:41:42 AM: Error(4): Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
7/7/2011 11:41:42 AM: Calculating NextRun...
7/7/2011 11:41:42 AM: NextRun set to 7/7/2011 4:30:00 PM
7/7/2011 11:41:42 AM: Leaving Thread Execute
7/7/2011 11:41:42 AM:
profile picture

Eugene

#6
Thanks. But now this is a very different error:
QUOTE:
7/7/2011 11:41:42 AM: Error(4): Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

The Abort-induced error message is now gone but the stage i.e. 4 persists.

I'm out of solid ideas but maybe it's some exception happening when trying to update the external symbol's (TOTALPC) data while in SM. Could you please run on Yahoo!, MSN etc. data and see if it makes difference vs. executing on Fidelity data?
profile picture

giorgos

#7
Tried with other providers and the same error occurs. I have searched but cannot find any other source for TOTALPC. I have written a number of scripts based on TOTALPC and its unfortunate I have to run each one manually
profile picture

Eugene

#8
The first and next errors are different. The prominent cause of the Abort error is absense of the external symbol's data. Since you mentioned custom strategies, try to replace TOTALPC in your strategy with a different external symbol and see if the problem persists. If it does, then it can be something about your code.

Which data loading range are you using to run your strategy in SM?
Can you provide a watered-down version to demonstrate the error?
profile picture

giorgos

#9
I have tried replacing TOTALPC with similar market data from other providers and it works fine. It occurs at all perods from the last 500 bars to the last 2000 bars. The problem is only with this data provider and the errors when running in strategy mode do occur with your own script "ActiveTrader 10-2007 | CBOE Put/Call Ratio [Revised]". This scrip also does not run in Combanation Strategy Mode. Any help to resolve would be appreciated.
profile picture

Eugene

#10
I'll take a look at what might be causing the problem.
profile picture

Eugene

#11
I've run a number of tests and think we might have hit some kind of an intermittent issue yet its nature isn't 100% clear to me. Although a Yahoo-to-Yahoo external symbol call may be fine, but Y!-to-CBOE, BloombergFree-to-CBOE or even CBOE-to-CBOE or Y!-to-IQFeed fail with the same error at Stage 4:
QUOTE:
Error(4): Object reference not set to an instance of an object

Specifying DataSet name directly or not does not seem to make a difference:
CODE:
Please log in to see this code.

Robert, could you run it and notice if the issue can be reproduced? tia.
profile picture

Cone

#12
Even though the script runs fine in a Strategy Window, it aborts for me too when pointing to "TOTALPC". However, if I point it to any other symbol, it works fine in the S. Monitor.
profile picture

Eugene

#13
Thank you. Any other symbol of which provider?

When making my tests, I forgot to mention, the try/catch block was excluded as well as the Abort directive. I was having the problem with almost any data provider out of many, incl. IQFeed.
profile picture

Cone

#14
I didn't specify a provider, but it probably hit Fidelity.
profile picture

Eugene

#15
I have no clue.

As a temporary workaround, giorgos might want to edit his strategies involving TOTALPC in a way to avoid the CBOE provider. One option is to export the data to ASCII and create an ASCII DataSet. Another alternative is to write some quick code to put the TOTALPC on Wealth-Lab's global memory (GOP) once a day using SetGlobal, and make any strategy destined for the SM to read these DataSeries from the GOP using GetGlobal.