I can't get alerts or trades when running realtime from SM when the script is run with industry indicators. When I open the same strategy using the strategy window, I get the alerts and trades. I tried data ranges upto 500 bars but no luck. Any suggestion on what I need to do.
CODE:
Please log in to see this code.
Size:
Color:
1. Are you using 6.3.14?
2. I don't have your indicators, but presumably the error occurs due to the inability to get a handle on the External Data. Try passing the name of the DataSet that contains your indices. i.e. -
CODE:
Please log in to see this code.
After making a change, save the script, close and re-open the S. Monitor.
Size:
Color:
Cone,
Yes I am using 6.3.14.
I have the handle you suggested in the code- the 5th line after 'try'.
Size:
Color:
QUOTE:
I have the handle you suggested in the code- the 5th line after 'try'.
What Cone suggests is to replace your handle with the version with a slightly different syntax and re-try.
Size:
Color:
Eugene,
I changed the syntax to include quotes.
CODE:
Please log in to see this code.
However I am still not getting alerts/trades in realtime.
Can you please help.
Size:
Color:
I don't know if this is the problem, but it seems clear from the "non results" that your script has a runtime error in the S. Monitor.
What is the name of the DataSet that contains the external industry symbols? Copy it from the Data Manager, please. ""+basicindustry2+"" isn't going to work
Size:
Color:
Not quotes. Do you see the DataSetName overload in bold in Cone's reply above?
Size:
Color:
Cone,
The DataSet that contains the external industry symbols is "Index-Lab 30-Minute" which is created by the Index Manager.
The industry symbol that Index Manager creates for "Basic Average" of an industry adds a prefix of "%" to each symbol and uses underscore
instead of space, so I need to convert the standard GICS symbol to that compatible to Index Manager. That's why I am using
"basicindustry2".
I copied and pasted the DataSet per your suggestion:
DataSeries indClose=GetExternalSymbol( "Index-Lab 30-Minute",basicindustry2,true ).Close;
It still doesn't work in SM.
I don't know anyother way to get the closing price of an industry for a stock symbol.
Size:
Color:
Is there a way to debug WL in SM mode so I can find out where a the script is running into errors in SM.
Size:
Color:
Sure, it's described in the User Guide:
Strategy Monitor > Strategy Pane > Strategies Right-Click Menu
Size:
Color:
I think we're dealing with a runtime error in the script here, so since PrintDebug isn't going to help us in the S. Monitor, let's just change your catch block to something like this:
CODE:
Please log in to see this code.
Then you can see the result in the text file created in the UserAppDataPath, which assuming Windows 7/Vista will be: C:\Users\Your Username\AppData\Roaming\Fidelity Investments\WealthLabPro\1.0.0.0
Size:
Color:
Cone,
Below is the error logged. I copied and pasted an external industry that the Index Manager created for the external symbol.
DataSeries indClose=GetExternalSymbol("Index-Lab 30-Minute", "%ADFBI", true ).Close;
2012-03-08 21:56:18,719 [19] ERROR dk [(null)] - Failed to fire OnWatchListGet event: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at WealthLab.DataProviders.FidelityWatchlist.b(bx A_0)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at System.Delegate.DynamicInvoke(Object[] args)
at ao.c()
Size:
Color:
Please describe the properties of the indices that the script needs to reference. What's the index definition? Are the data in the same intraday scale used to trade the script?
Size:
Color:
I utilized 'Basic Index' in the Index Builder of the Index Manager which averages the values of the symbols provided. In the script I provided I asked the Index Manager to average the values of symbols in the Aerospace industry. I followed the same example provided in the "Using Indexes" in Wealth Lab Users Guide to build my script. The data that the Index Manager builds is is in 30 min intraday. My script uses a 60 min intraday.
Size:
Color:
Have you tried matching the bar scales of the Index Manager's and the primary DataSets?
Will the error appear if both DataSets use Daily data?
Size:
Color:
I'll try to duplicate this today with that setup.
@Eugene: The static Fidelity Provider in WL Pro only allows you to create 30 min DataSets (max intraday base scale) from which 60 min bars must be scaled.
Size:
Color:
Cone,
Thanks
I hope there is a work around to this problem.
Size:
Color:
Eugene,
I run the script in 30 minute scale to match the Index Manager scale but no luck.
Size:
Color:
Cone,
Did you have a chance to duplicate the problem.
Size:
Color:
I did, but in my case the error was "Index was out of range.".. and now I'm sidetracked. Please create a support ticket for this one. tia.
Size:
Color: