Hi,
I would like to chart relative performance of 2-10 instruments starting at Data range definition (at 0%)...
This script was available in WL4, but in WL5 there is nothing like that:(
Can anybody help?
Thx
Peter
Size:
Color:
If you're looking for a way to compare to a benchmark symbol, then see WealthScript Programming Guide, chapter Painting the Chart > Charting Multiple Symbols > Compare to a Benchmark Symbol.
Otherwise let me know the name of the chartscript.
Size:
Color:
Yes, I know about this chapter, there is following code:
CODE:
Please log in to see this code.
But it gives me errors...I don´t know how to implement it with initial part of the script:
CODE:
Please log in to see this code.
In summary I would like to get something like this:
http://finance.yahoo.com/echarts?s=IBM#chart2:symbol=ibm;range=1y;compare=^dji+^ixic;indicator=rsi+stochasticfast(10,5);charttype=line;crosshair=on;ohlcvalues=0;logscale=off;source=undefined
Size:
Color:
1) Please use the CODE and LINK buttons to present code and links respectively. Your link is not working.
2) No need to paste example code.
QUOTE:
But it gives me errors...I don´t know how to implement it with initial part of the script:
Every example comes with a link that points to the chapter illustrating "How to Run Example Code". Just copy and paste the snippet like the screenshot shows:
1. Copy the entire example code snippet.
2. Create a new Strategy window.
3. Select code starting from "protected..." and up to the penultimate curly bracket. In other words, there should be two brackets left
not highlighted at the end of the Editor window.
4. Paste.
5. Create as many
PlotBenchMark calls for different symbols as needed.
6. Press "Execute".
Size:
Color:
Size:
Color:
Here you go - this one's a full copy and paste. Click "Run the Strategy" to compile and run after pasting it in the Editor.
CODE:
Please log in to see this code.
Size:
Color:
Great:) That´s exactly what I was looking for.
I have just changed date to 1900 to be able use various data ranges for start.
PlotBenchMarkPct(benchMarkSymbols, colors, new DateTime(1900, 1, 1));
BTW, now I am trying to have 'new DateTime' as Strategy parameter but still fighting with compiling errors..any programmer can help how to implement this code?
CODE:
Please log in to see this code.
Size:
Color:
Change "MovingAverageCrossover" to the name of your Strategy class. If you used the code above, it's MyStrategy. I'm pretty sure there are step-by-step instructions for this in the WealthScript Programming Guide.
In fact, there are! See: Programming Trading Strategies > Strategy Parameters
Size:
Color: