Price to Sales Ratio in Code versus Rules
Author: shardis89
Creation Date: 1/22/2013 10:52 PM
profile picture

shardis89

#1
I cant figure out how to program the price to sales ratio for position sizing into my code for a strategy, so I created a rules based strategy with price to sales then copied the code and pasted into my rules based strategy. Everything runs fine as long as I put

"using WealthLab.Rules" at the top of the code however, the optimizer will not display any results. Has something to do with the WealtLab.Rules. Any suggestions for coding the price to sales into a code based strategy?

Here is the code I used:

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

Eugene

#2
1. So how is slider1 defined? Showing us the complete code might help.
2. How are you optimizing? Please give us the details.
profile picture

shardis89

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

Eugene

#4
Before I look further down the code, this cries for immediate correction:
CODE:
Please log in to see this code.

Each and every parameter slider description must be unique. Here we have two sets of identical values. This is guaranteed to perplex the Optimizer.
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).