SetSeriesValue
Author: nisaion2
Creation Date: 7/10/2009 2:16 AM
profile picture

nisaion2

#1
Is there any function in the WealthScript(.NET) which is similar to function “SetSeriesValue” of Wealth Lab 4 and enables to store information for each bar?
profile picture

Eugene

#2
Yes, there is: see DataSeries > Filling a Custom DataSeries in the WealthScript Programming Guide. Which version are you using?
profile picture

nisaion2

#3
The version is Wealth-Lab Developer 5.
How is it possible to check whether a buy signal was generated on bar-1, bar-2, and bar-3?
Thank you
profile picture

Eugene

#4
That still runs 8 months after expiration? ;)

For example, by saving the bar when your setup (condition) was true and checking it later.
profile picture

nisaion2

#5
It looks like there is a bug in the Wealth-Lab Pro 5.4.20.0. The code below does not execute correctly. It sets background color not on the bar, but on the bar+1.

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

Eugene

#6
Nope, just can't seem to reproduce.

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

Eugene

#7
Which bar scale, symbol, data provider etc.?
profile picture

nisaion2

#8
Same thing with the code you provided.
On daily ^NDX.CSV and the stock.CSV data both downloaded from Yahoo.
When I click on the ^NDX the background color sets on the correct bar, but if I click on the stock, the background color sets on the bar+1.



profile picture

Cone

#9
It's seems not possible, but it would help if you could identify the precise stock symbol, Data Loading settings, and some dates that are incorrectly colored, we'll try to reproduce (or explain) what you're seeing.
profile picture

nisaion2

#10
It happens on the all symbols from the ASCII dataset, but not on the symbols from Fidelity dataset.
For example:
If I click on the ^NDX (ASCII) it colored from 3/3/2009-3/9/2009 and on the 3/16/2009;
If I click on ABC (ASCII) it colored from 3/4/2009-3/10/2009 and on the 3/17/2009;
If I click on the ABC (Fidelity) it colored from 3/3/2009-3/9/2009 and on the 3/16/2009;

Actually, it happens on some symbols from Fidelity NASDAQ 100 as well. For example, on the GOOG and GRMN it colored from 3/4/2009-3/10/2009 and on the 3/17/2009;
profile picture

Eugene

#11
This looks like synchronization in action.

You need to make sure that ABC (ASCII) is identical to ABC (Fidelity). In other words, export ABC from your Fidelity dataset using the strategy code below and compare:

Exporting to ASCII comma-separated files (CSV)

This way you'll not be comparing apples to oranges (e.g. missing bar and synchronization enabled).
profile picture

Cone

#12
I don't see the problem with my ASCII DataSets. Maybe you're ASCII data is off by a bar?
profile picture

nisaion2

#13
I think that the problem is not in the ASCII files. The code below uses Fidelitys' .NDX and there is the same problem.

CODE:
Please log in to see this code.


In the Fidelitys' NASDAQ 100 dataset when i click AAPL it colored 7/7/2009, but if I click GOOG in the same Fidelity dataset it colors 7/8/2009
profile picture

Eugene

#14
Again, it's not the case with my data. Perform 'Reload chart history'.
profile picture

nisaion2

#15
I did "Reload chart history", but it did not help. Same thing.
It is a Wealth Lab Pro 5.4.20.0
Windows 7 x 64bit

What else do you need to know to fix the problem?
profile picture

Eugene

#16
At first, to reproduce it.
profile picture

Cone

#17
It could be that you're misinterpreting what you're seeing. How about posting an image?

A "Set" function is only going to operate on the bar passed to the function. It can't do anything else because the method doesn't "change" the bar value when performing its operation.
profile picture

nisaion2

#18
How can I post the images?
profile picture

Eugene

#19
1. Upload it to any image hoster
2. Find out the direct link (not thumbnail)
3. Click on the IMG tag and paste that link in between
profile picture

nisaion2

#20
Here are the images :
.NDX - colored correctly

AAPL - colored correctly:

GOOG - colored incorrectly: 7/8/2009
profile picture

Cone

#21
What, precisely, is incorrect about GOOG coloring? The background is colored LightBlue when CMO dips below -20. It looks correct to me for every case.
profile picture

nisaion2

#22
It is not correct, because the date is 7/8/2009 but not the 7/7/2009 as it suppose to be.
The CMO is also incorrect and moved to the right (bar+1).
Also pay attention to the "Last Date: 7/20/2009" at the bottom. It is the same on the all charts, but how come CMO is 23.00, 23.00, and 9.45 for the GOOG?
profile picture

Cone

#23
Now we're on the same page, thanks. It's an external series synch bug. We plan to have all known synch issues fixed in 5.5. Please create a Support Ticket to ensure the one is fixed too. Sorry for this inconvenience.
profile picture

nisaion2

#24
I do not really know how to create a Support Ticket, but thank you for recognizing the problem. Do you have any idea when the 5.5 will come out?
profile picture

Cone

#25
Click "Support" in the upper menu, and select "Create a Support Ticket".

WLP 5.5 is a September-ish release, but if a synch bug in 5.4 is giving you trouble now that you weren't having before in 5.3, you can downgrade. Call Fidelity Wealth-Lab Support for assistance with that.
profile picture

nisaion2

#26
I am trying to install Wealth-Lab Developer 5 on Windows 7x64 bit, but after installation the program gives an error and cannot run. The error is "WealthLabDev has stopped working. Windows is checking for a solution to the problem..."
profile picture

Eugene

#27
profile picture

Cone

#28
nisaion2, fyi, the "Developer" version of Wealth-Lab isn't available for purchase in your area. Besides, 5.1 is a big downgrade from your current version of "Pro", though the Developer 5.4 equivalent should be available very soon.
profile picture

Eugene

#29
And your 5.1 trial expired last November to boot.
profile picture

nisaion2

#30
It looks like there is a bug in the Wealth-Lab Pro 5.4.20.0. The code below does not execute correctly. It does not set background color on the all bars when CMO is equal to 100.

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

Eugene

#31
WL5 has nothing to do with it. This has to do with testing for exact equality of double/float in .NET. Use this or similar workaround:

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

nisaion2

#32
Is it possible to make alerts being seen on the “Chart” window but not only on the “Alert” window?
profile picture

Eugene

#33
Try manually processing the alerts by looping through the Alerts list after the main loop. QuickRef for more.
profile picture

nisaion2

#34
I am sorry, I think I did not formulate the question right.
I mean if it is possible to make the Wealth Lab Pro to show Alerts to buy or sell with Quantity, Order Type, and signal name below the chart when alerts generated for the last bar. (only for the last day)
profile picture

Eugene

#35
To resemble the V4 behavior? Yes, the Strategy Monitor does what you want.
profile picture

nisaion2

#36
While backtesting on 2500 symbols on data range of 1000 bars, gives errors:
“Exception of type ‘System.OutOfMemoryException’ was thrown.”
Is there any way to prevent this error?
profile picture

Eugene

#37
profile picture

nisaion2

#38
Will WLP 5.5 be available in form of 64-bit installation?
Will WLP 5.5 have an option to draw “Equity Curve” on a Log Scale?
Thank you
profile picture

Cone

#39
QUOTE:
Will WLP 5.5 be available in form of 64-bit installation?
Please call your Fidelity rep for this answer, then you can tell us!

QUOTE:
Will WLP 5.5 have an option to draw “Equity Curve” on a Log Scale?
It already exists in Strategy Equity and Drawdown Community Visualizer.
profile picture

Eugene

#40
QUOTE:
It already exists in Strategy Equity and Drawdown Community Visualizer.

And in Closed Equity visualizer too.
profile picture

nisaion2

#41
QUOTE:
It already exists in Strategy Equity and Drawdown Community Visualizer.

According to what I see, only the "Drawdown" tab has 2 options to show the drawdown: $ and %, but the "Equity Curve" tab does not have this options. It shows equity only on the linear scale of $.
profile picture

Eugene

#42
profile picture

nisaion2

#43
QUOTE:
Please call your Fidelity rep for this answer, then you can tell us!

According to Fidelity, the reason why WLP5 does not have 64bit version is the data provider to WLP5 which has a 32bit system. They are planning to change the platform of the data provider, but more likely it will be available only in the next year :(
profile picture

nisaion2

#44
Is there any way to set a Position Sizing Leeway in WLP 5.4?
profile picture

Eugene

#45
By using a margin ratio slightly greater than 1:1.
profile picture

nisaion2

#46
Why the following code does not calculate the Moving Average of the CMO?
CODE:
Please log in to see this code.
profile picture

Eugene

#47
Because this way you're creating a new, zero-filled series.

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

nisaion2

#48
It looks like there is a bug in WL5. The following code does calculate the Mov Aver of CMO but does not calculate the Mov Aver of TII from “Community Indicators”.
CODE:
Please log in to see this code.
profile picture

Eugene

#49
QUOTE:
It looks like there is a bug in WL5.

Fortunately, just a bug in TII.Series that I've just checked in. Thanks for the heads-up.
profile picture

nisaion2

#50
Why the code below generates 3 sell-market orders on 6/25/2008 but closes all 5 positions on 6/26/2008 while running it on daily JRCC?
CODE:
Please log in to see this code.

Is it a programs' problem, or something wrong with the code?
Thank you.
profile picture

Eugene

#51
Yes, it's an error in your code -- using LastPosition in a multi-position script (i.e. ActivePositions):
CODE:
Please log in to see this code.

You should move the SellAtMarket directive inside the ActivePositions loop and refer to p (which is the active position you're processing) instead of LastPosition.
profile picture

nisaion2

#52
Here is the comparable code in WL4 (or may it is not comparable):
CODE:
Please log in to see this code.


this code uses the same logic and the same "Lastposition" but executed correctly in WL4.
profile picture

Eugene

#53
Looping through ActivePositions is not the same as Positions. QuickRef for more.
profile picture

nisaion2

#54
Looping through Positions is giving the same wrong executions:
CODE:
Please log in to see this code.
profile picture

Eugene

#55
Why do you keep insisting on the same LastPosition mistake? Carefully re-read my message dated 8/20/2009 11:40 AM.
profile picture

nisaion2

#56
Because I want to count how many bars passed since the last position was entered, but not how many bars passed since the entry of the currently processing position, namely exactly the same way as WL4 does.
profile picture

Eugene

#57
Hint: ActivePositions is an array. Item #0 is the 1st, and #ActivePositions.Count-1 is the last.
profile picture

nisaion2

#58
Strange that nobody wanted to help, but anyway…
Here we go...
Even though Eugene does not want me to use “LastPosition”, the script works fine when we iterating with function “foreach” but does not work when “for” loop is used. If anybody has an idea why that happens, please explain.
Thank you.
CODE:
Please log in to see this code.
profile picture

Eugene

#59
QUOTE:
Strange that nobody wanted to help, but anyway…

Actually, nothing strange. We're maxed out with other work. And helping registered customers on the forum has a higher priority than... well, you know.
profile picture

nisaion2

#60
Ok.
So, only when you have an extra free time, could you please check why the script does not work while using “for” loop but does work while using “foreach” loop. (I am asking just to make sure it is not another bug in the software).
Thank you.
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).