Noticed all the nice info about C# on the forum, but for my simple scripts I probably would learn more by seeing my own scripts getting converted. So, anyone who takes this?
Regards
Mats
CODE:
Please log in to see this code.
Size:
Color:
Not very much different, isn't it?
CODE:
Please log in to see this code.
Size:
Color:
Thanks a lot Eugene. It's absolutely understandable, not that big difference.
This is the only part I don't understand that well. The script is for second, should that matter?
CODE:
Please log in to see this code.
Size:
Color:
Mats, in its present state your script does not show anything specific to seconds. If for some reason you decide to compare dates with seconds (e.g. if GetTime(bar) > 150030... ), then just modify the function to honor seconds:
CODE:
Please log in to see this code.
Size:
Color:
aha, that's what it was. What does these two mean?
Thanks for the feedback :-)
CODE:
Please log in to see this code.
Size:
Color:
QUOTE:
aha, that's what it was. What does these two mean?
That's C#.
A class (here called "Mats") of type
WealthScript is a group of methods, functions and variables, related to a C# trading strategy.
Execute() is the main point of entry of a Strategy in WealthScrpt, equal to
procedure Main() in a C# program.
Classes is a huge topic, therefore it's best to pick a free .NET/C# book from the list below:
Net BooksPro C# & .Net 3.5.Net Book ZeroC# CodeNotesC# Tutorial 1C# Tutorial 2C# Tutorial 3Keep in mind that you don't have to be proficient in C# to build strategies. After acquiring basic knowledge of syntax and concepts, see QuickRef and the WealthScript Programming Guide, compare the old and new examples, and feel the difference.
Size:
Color:
Exactly :-) I look forward to getting the feeling. Are there many days left for the 5.0 for non US now?
Size:
Color:
QUOTE:
Are there many days left for the 5.0 for non US now?
Currently we believe that, according to the Wealth-Lab Wiki main page, it's going to happen today:
Wealth-Lab News
Size:
Color:
oh, I see, looking forward to it. Thanks for the help today :-)
Size:
Color:
Unfortunately Wealthlab Developer 5.1 is still (27 Aug) not purchasable or downloadable from the wealth-lab website.
Size:
Color:
It's "released", but it's up to the webmaster to post it. "Purchase", however, will still be delayed several more days, but that won't affect use of the product since the first 30-days are free anyway.
Size:
Color:
Mr Webmaster, please post it, hardly can't wait.... :-)
Size:
Color:
just so I know when I test it, will the WL5 take advantage of all cpus( like 4*100% if Quad) maximum by itself without any settings?
Size:
Color:
Yes.
Size:
Color:
The Webmaster has come through again... let the downloads begin!
Size:
Color:
Superb, here we go!
Size:
Color:
How do I OR "TradingSessionMidday" to TradingSessionOpen?
if( TradingSessionOpen & CrossUnder( bar, wma1, wma3 ) ) ShortAtMarket( bar+1, "Short");
Size:
Color:
QUOTE:
How do I OR "TradingSessionMidday" to TradingSessionOpen?
The equivalent operator in C# is
| (or
||) -- please see reply above from
8/26/2008 7:54 AM for some tutorial links.
CODE:
Please log in to see this code.
Size:
Color:
this worked, thanks
if((TradingSessionOpen||TradingSessionMidday||TradingSessionClose ) &
CrossUnder( bar, wma1, wma3 ) )
ShortAtMarket( bar+1, "Short");
Another thing, I tested the WL4 vs WL5 with same script, and it came out 5 trades more of 500 and 0,1% different profit. I'm sure the script is the same. Is this to be counted as normal?
Size:
Color:
QUOTE:
Another thing, I tested the WL4 vs WL5 with same script, and it came out 5 trades more of 500 and 0,1% different profit. I'm sure the script is the same. Is this to be counted as normal?
Yes, sometimes.
1. For stop or limit orders, tick adjustment is slightly different than in WLD4.
2. For market orders in portfolio simulation mode, you should assign priority to a position because when trades are rejected due to lack of capital, the new truly random priorities for positions come in play (refer to
Strategy Window > Backtesting Strategies > How Trades Are Chosen in the User Guide for more details).
Size:
Color:
Other likely culprits:
1. Did you use the same data (exactly the same)?
2. Same Options / Preferences?
3. Turn off all $imulator options?
Size:
Color:
This should all be the same Yes. I will take a deeper look at it this weekend, gowing troutfishing now :-)
Size:
Color:
obs... guess You are adding a delete function soon too
Size:
Color:
Yes ;)
Size:
Color:
Is there a optimization function in WL5?
Size:
Color:
The functionality is rolled out in phases, so optimization is something I'd expect in a future release.
For now we're bound to interactive optimization using Parameter Sliders.
Size:
Color:
oki, thanks :-)
Size:
Color:
I just upgraded to WL5. Where do I start to learn the new coding? I have a trusted function in WL4 that I need to convert that uses floats for a MACD (such as 35.0 and 35.005) which seems to give me a better indicator than the regular MACD. Does the new WL5 allow custom functions?
Anyone willing to save me some time on convertion?
CODE:
Please log in to see this code.
Size:
Color:
Start with the WealthScript Programming Guide. It gives lots of examples.
Size:
Color:
QUOTE:
Does the new WL5 allow custom functions?
Yes. Many custom indicator open source code available in our
WL5 Wiki.
QUOTE:
Anyone willing to save me some time on convertion?
Here it goes. Keep in mind there is more than one way to skin a cat, so these indicators can be compiled and then appear as a regular item on the Indicators list, allowing itself to be selected in Rule-based strategies and included in any code-based strategies. But for starters it should suffice.
CODE:
Please log in to see this code.
Size:
Color: