I'm having no luck using the contractNext() function for an options chain. The function does not seem to return any valid contracts... is this a bug or me misunderstanding its usage? I'attaching my simple test script running against SPY options data.

Output looks like this:

strike: 200.0
no next strike found
no prev strike found
V 2.016 on Sun 19-02-03 18:52:20 (Zorro S Subscription)
Test: CheckContractNext SPY 2016..2018
[1: Tue 16-01-05 15:40] (201.38)
strike: 201.0
no next strike found
no prev strike found
[2: Wed 16-01-06 15:40] (198.83)
strike: 199.0
no next strike found
no prev strike found
[3: Thu 16-01-07 15:40] (194.04)
strike: 195.5
no next strike found
no prev strike found
...

Any ideas?

Attached Files
CheckContractNext.c (37 downloads)