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.
Size:
Color:
1. So how is slider1 defined? Showing us the complete code might help.
2. How are you optimizing? Please give us the details.
Size:
Color:
CODE:
Please log in to see this code.
Size:
Color:
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.
Size:
Color: