"Market Capitalization (ttm)" and index out of range
Author: rdevolde
Creation Date: 7/29/2008 9:51 PM
profile picture

rdevolde

#1
I am hoping to only test code on larger cap stocks but when I make a new strategy from rules it says that the index was out of range. Does anyone know how to fix this problem? Here are the steps and code I used:


Buy at Market --> Conditions: Fundamental Raitos --> Market Capitalization (ttm) is greater than a Value (1.00)


Here is the generated code as well, any help would be greatly appreciated, thanks!


CODE:
Please log in to see this code.
profile picture

Eugene

#2
Russ,

There was a known problem with rules using fundamental ratios in 5.0, but it's fixed in upcoming 5.1 release.
profile picture

Eugene

#3
Meanwhile (until 5.1 comes out soon) you could use this workaround in a code-based strategy:

CODE:
Please log in to see this code.
profile picture

akar

#4
This program is not working. It's not returning any trades

Also, how do I print out the market cap. PrintDebug(dsRatio[bar]) is not outputting a value
profile picture

Eugene

#5
Not enough details. Note that "It doesn't work" style posts just don't work.

1. Have you updated the "Fidelity Fundamental Data for Securities" provider?

2. What are your...

* Bar scale
* Single symbol or Multi-symbol mode
* Data Loading settings
* Symbol(s) and Data provider
?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).