Posted 3/11/2010 11:32:09
|
|
|
|
| Hi. Is it possible in RightEdge to define spreads (for inst. +NATGAS-CRUDE OIL) and chart them (the spread, not the single legs)?
|
|
Posted 3/12/2010 09:03:56
|
|
|
|
Yes, you'd have to create a UserSeries that merges the data in code. Have a look at the Ratio trading system. This is a user submitted system that hasn't been converted to the latest version of RightEdge, but the concepts remain the same.
fdanil (3/11/2010) Hi. Is it possible in RightEdge to define spreads (for inst. +NATGAS-CRUDE OIL) and chart them (the spread, not the single legs)?
|
|
Posted 6/18/2010 13:47:13
|
|
|
|
| Hi i downloaded this system is working fine, except for the macdRatio witch remais empty. Any idea ??? Itried RatioMACD[symbol].SetInputs(Ratios[symbol]); RatioMACD[symbol].NewBar(); // Add MACD value to the chart seriesSeries[ "RATIOMACD"][symbol].SetCurrentValue(BarUtils.LastValueOf(RatioMACD[symbol]));but none seems to work. Any idea ?? Thank´s Vitor Dantas
|
|
Posted 6/21/2010 07:36:04
|
|
|
|
First, you'll want to use the .Current property instead. Second, what is the value of RatioMACD[symbol] when you add it to the UserSeries?
vitor dantas (6/18/2010) Hi i downloaded this system is working fine, except for the macdRatio witch remais empty. Any idea ??? Itried
RatioMACD[symbol].SetInputs(Ratios[symbol]);
RatioMACD[symbol].NewBar();
// Add MACD value to the chart series
Series["RATIOMACD"][symbol].SetCurrentValue(BarUtils.LastValueOf(RatioMACD[symbol]));
but none seems to work. Any idea ??
Thank´s Vitor Dantas
|
|
Posted 6/21/2010 09:56:24
|
|
|
|
| The system create a serie that is the ratio from the two securities after this we create a macd over the ratio(MacdSerie). But it returns a macdSerie empty. It´s seems that somewere is missing a command to attach the dataserie to the indicator
|
|
Posted 6/22/2010 08:37:19
|
|
|
|
You're basing this off of old code. I would recommend visiting the section Developing Trading Systems in RightEdge. And scroll down to the section titled User Series. You really want to do something like this:
UserSeries mySeries;
public override void Startup()
{
mySeries = new UserSeries();
mySeries.ChartSettings.ChartPaneName = "MySeriesPane";
mySeries.ChartSettings.Color = Color.Red;
mySeries.ChartSettings.DisplayName = "My Ratio";
}
public override void NewBar()
{
mySeries.Current = calculate your value here.
}
vitor dantas (6/21/2010) The system createa serie that is the ratio from the two securities after this we create a macd over the ratio(MacdSerie). But it returns a macdSerie empty. It´s seems that somewere is missing a command to attach the dataserie to the indicator
|
|
Posted 6/22/2010 16:41:07
|
|
|
|
| Ok , i sow, what i want to do is create a userSeries and create an indicator over the user Serie ! When i do that on that system it returns an empty Indicator of the (userSerie). I think some Attach command is missing something that feed the indicator with the user serie,
|
|
Posted 6/24/2010 08:55:31
|
|
|
|
I'm afraid I don't understand. Can you ask the question a different way?
vitor dantas (6/22/2010) Ok , i sow, what i want to do is create a userSeries and create an indicator over the user Serie ! When i do that on that system it returns an empty Indicator of the (userSerie).
I think some Attach command is missing something that feed the indicator with the user serie,
|
|
Posted 6/29/2010 11:19:17
|
|
|
|
| Resuming the creation of the userSerie is working fine, but when i create an indicator over this userSerie - only returns double.NAN . . . It doesn´t give me any value !!! That´s why i´m thinking that i´m mot feeding the indicator properly ...
|
|
Posted 6/30/2010 16:10:23
|
|
|
|
Where are you getting the indicator values from? What values are you feeding to the user series?
vitor dantas (6/29/2010) Resuming the creation of the userSerie is working fine, but when i create an indicator over this userSerie - only returns double.NAN . . . It doesn´t give me any value !!!
That´s why i´m thinking that i´m mot feeding the indicator properly ...
|
|
|
|