need help to insert PolynomialRegressionChannels in my bot
need help to insert PolynomialRegressionChannels in my bot
20 Jan 2021, 19:49
Hi all can anyone help me to correctly insert this indicator into my bot?
This is the cbot code
[Parameter("PRC Degree", DefaultValue = 3.0, MinValue = 1, MaxValue = 4)]
public int degree { get; set; }
[Parameter("PRC Period Short", DefaultValue = 30)]
public int period { get; set; }
[Parameter("PRC Standard Deviation 1", DefaultValue = 1.6)]
public double strdDev { get; set; }
[Parameter("PRC Standard Deviation 2", DefaultValue = 2)]
public double strdDev2 { get; set; }
[Output("PRC", LineColor = "#7E68D0F7", LineStyle = LineStyle.Lines)]
public IndicatorDataSeries prc { get; set; }
[Output("SQH", LineColor = "#7E68D0F7", LineStyle = LineStyle.Lines)]
public IndicatorDataSeries sqh { get; set; }
[Output("SQL", LineColor = "#7E68D0F7", LineStyle = LineStyle.Lines)]
public IndicatorDataSeries sql { get; set; }
#endregion
private string botName;
private string instanceLabel;
private double stopLoss;
private PRC newprc;
protected override void OnStart()
{
botName = ToString();
instanceLabel = botName + "-" + Symbol.Name + "-" + TimeFrame.ToString();
newprc = Indicators.PolynomialRegressionChannels(degree, period, strdDev, strdDev2);
}
Replies
darksammo
21 Jan 2021, 08:44
RE:
firemyst said:
From the code you provided above, you need to do two things:
1) remove
#endregion as there's no corresponding #region tag
2) Change the line
private PRC newprc;
to
private PolynomialRegressionChannels newprc;
because there is no "PRC" object type defined in your code.
Hi Firemyst thanks for the reply
i do it and get this error
Error CS0246: The type or namespace name 'PolynomialRegressionChannels' could not be found; probably missing a using directive or assembly reference
@darksammo
firemyst
21 Jan 2021, 05:14 ( Updated at: 21 Jan 2021, 05:15 )
From the code you provided above, you need to do two things:
1) remove
#endregion as there's no corresponding #region tag
2) Change the line
to
because there is no "PRC" object type defined in your code.
@firemyst