Various code Q&A
Author: sedelstein
Creation Date: 1/7/2011 9:56 PM
profile picture

sedelstein

#1
Hello.

I am brand new to wealth-lab. I know how to program so that's not a problem

I see when I use the packaged strategies that some operate on single stocks and some operate on indexes, say, all the stocks in the DOW, for example.

I've been looking at the code, manuals, and FAQs. I just don't seem to find it.

Thanks for the help

Steve
profile picture

Eugene

#2
Hello Steve,

If you're looking for a way to execute trades on secondary symbols, then Programming Trading Strategies > Multi-Symbol Strategies in the WealthScript Programming Guide will provide a starting point.
profile picture

sedelstein

#3
Hello Eugene,

Is version 5.4 (.Net) the current version?

I have some other manuals that are up to version 6.0

I'll check around some more. Thanks
profile picture

sedelstein

#4
Hi,
Just read the manual and looked over the code for the Dogs of the Dow Rotation strategy.

When I open up the strategy, in the Data Set tab there is a button to "Backtest on all Symbols in Dow 30"

I don't see how that is set vs running a single stock. It didnt appear in the section Programming Trading Strategies > Multi-Symbol Strategies in the WealthScript Programming Guide

profile picture

sedelstein

#5
Think I see it now. The data panel wasn't open

thanks
profile picture

Eugene

#6
QUOTE:
Is version 5.4 (.Net) the current version?

Why are you asking about version 5.4?
profile picture

sedelstein

#7
Because when I googled the WealthScript Programming Guide the only thing I found to download was Fidelity's version Version 5.4 (.NET) which I downloaded and I see what to do but was wondering where the current version was
profile picture

sedelstein

#8
By the way,

I'm having trouble figuring out the syntax to see if today is a 10 day low

I'm setting a bool called Condition1

CODE:
Please log in to see this code.


It's not right. I'm been RTFMing all morning.

Thks
profile picture

Eugene

#9
QUOTE:
Because when I googled the WealthScript Programming Guide

OK I see. Here's the official download page: http://atp.fidelity.com/
QUOTE:
I'm having trouble figuring out the syntax to see if today is a 10 day low

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

sedelstein

#10


Thank you

I did go to Fidelity's pages and you do get version 5.4 for some of their guides

appreciate the help on lowest bar
profile picture

sedelstein

#11

CODE:
Please log in to see this code.


I get "cannot implicitly convert type 'double' to 'bool'
profile picture

Eugene

#12
Your Condition1 can't be bool. You're subtracting a numeric value (LowestBar, double) from another numeric value (bar, integer). It's a number.
profile picture

sedelstein

#13
ok

New to C#, In other languages if the numeric value is 0 you get a false, otherwise true
profile picture

Eugene

#14
QUOTE:
In other languages if the numeric value is 0 you get a false, otherwise true

Right but assumptions like these make some of these languages convoluted and ambiguous. One of the C#'s highlights is strong typing.
profile picture

sedelstein

#15
ok,

I have some things to learn no doubt.

I'm getting an error msg now when I try to compare two moving averages

CODE:
Please log in to see this code.


I'm being told the ">" operator cannot be applied to type double. and WealthLab DataSeries

How would I compare two different length moving avgs?

Thanks
profile picture

Eugene

#16
Your line of code supposedly looks correct but one of the variables might be defined incorrectly. Give us a hint by posting how did you define the variables.
profile picture

sedelstein

#17
Here's how I define them

CODE:
Please log in to see this code.


profile picture

Eugene

#18
It's OK. Post the line of code that gives you the error.
profile picture

sedelstein

#19
// Moving averages lined up
CODE:
Please log in to see this code.


the first line
profile picture

Eugene

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

sedelstein

#21
oh Dumb.

Sorry to waste your time.

the error message was a little less than clear.

Over time I'll learn I guess

thanks for your patience, I appreciate it
profile picture

Eugene

#22
Hello Steve,
QUOTE:
I did go to Fidelity's pages and you do get version 5.4 for some of their guides

+
QUOTE:
"I found four references. Some of these dates are from 2006. I'm concerned the manuals I have are not up to date.
Before I invest a lot of time perusing these, can you confirm I have the right ones."

I'm not in charge of this documentation. Maybe Robert knows better?
profile picture

sedelstein

#23
ok,

Apologies for the new post. I thought it was a different topic. The first dealt with code. The new one was about documentation. To my mind, a different thread.

Being new to this, I don't know who Robert is. How can he be contacted? I'd like to learn and not err because what I'm reading is out of date.


Steve

profile picture

Eugene

#24
Robert is "Cone" and he's the author of the Wealth-Lab User Guide / WealthScript Programming Guide among the rest.

Anyway, the User and Programming Guides and the QuickRef (F11) that you have under the Help menu are always up to date.
profile picture

sedelstein

#25
ok, Sometimes it's good to peruse a book rather than do all your reading on the screen.
Is there a way to mail specific user .e.g. Cone, to ask? I didnt see a way.
profile picture

Eugene

#26
QUOTE:
ok, Sometimes it's good to peruse a book rather than do all your reading on the screen.

It's just very hard to imagine how could that help learning an interactive application like Wealth-Lab. Unless the PDF guides are being read on an advanced e-book reader, they lose the benefit of being searchable. And even if your e-book reader lies next to your monitor, you lose the ability to copy and paste C# code samples and run them in WLP. ;)
QUOTE:
Is there a way to mail specific user .e.g. Cone, to ask? I didnt see a way.

As an administrator of the site, Cone will see your post/my question. Since we honor the privacy of our customers, we're not disclosing users' contact details (i.e. e-mail address). So there should be no way to mail specific users.
profile picture

sedelstein

#27
ok, Call me old school, I don't mind dog-earing pages and just getting a general feel of what I can do by flipping pages. When I do need to cut and paste, I go to the on-line apps. My eyes just get tired with screens the whole day.
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).