- ago
I'm running a rotational strategy on a DataSet:
1. open the rotational strategy
2. run backtest
3. go to Chart tab

The symbol depicted is randomly selected from the entire DataSet. How I can select a specific symbol? I need this as the strategy draws some lines on the chart, but they are meaningful only if an index ticker is displayed (e.g. $SPX).

Thank you
0
71
9 Replies

Reply

Bookmark

Sort
Cone8
 ( 3.17% )
- ago
#1
For a C#-Coded Rotation, get the BarHistory for $SPX and PlotBarHistory in new pane. Put your drawings in that pane.
0
Glitch8
 ( 6.70% )
- ago
#2
Type the desired symbol and press enter.
0
- ago
#3
QUOTE:
Type the desired symbol and press enter.

I'd love to, but I don't understand where. Could you please suggest?



Thank you

0
- ago
#4
QUOTE:
For a C#-Coded Rotation, get the BarHistory for $SPX and PlotBarHistory in new pane. Put your drawings in that pane.


I would like to use the main chart, but if I use PlotBarHistory on "Price" paneTag, I will get $SPX, but the random ticker's chart is also in place, making $SPX not readable because of the same Y axis.

0
Cone8
 ( 3.17% )
- ago
#5
You can't. Draw it in another pane and squish the Price pane.

CODE:
         BarHistory spx = GetHistory(bars, "$SPX");          PlotBarHistory(spx, "SPX");                    //do drawings in the "SPX" pane          DrawHorzLine(spx.LastValue, WLColor.Aqua, paneTag: "SPX");                    //make the pane 2000x the size as the Price pane and put it on top          SetPaneDrawingOptions("SPX", 20000, -1);
1
- ago
#6
I managed to get what I wanted, but used SetPaneDrawingOptions("Price", 0, -1) so that other additional panes are also visible.

Thanks for the suggestion.

It would be nice to have symbol selector for the "Price" IMO :)

Another minor disadvantage: when I plot bars on a new Pane and the hover mouse over any bar, there are no Date O H L C CHG data in the left upper corner, only Close price.
0
Cone8
 ( 3.17% )
- ago
#7
Re: SetPaneDrawingOptions("Price", 0, -1)
Nice hack! I should have thought of it :)
0
- ago
#8
Is there any way to override OnMouseHover or anyhow see OHLC and Date on the index chart?
0
Cone8
 ( 3.17% )
- ago
#9
Nope.
Why don't you just don't run your drawing study in its own window for $SPX?
What's the relationship to the rotation strategy?
0

Reply

Bookmark

Sort