This is likely easy ... just cant yet get my head around it. I want to test an entry filter BarsArray==0, NT7, and did get almost there, but cant figure out the final step on how to calculate iGoShortETOPtest so I can test it against iGoShortETOPtotal
// ENTER SHORT WHEN
// (( ETOP #bars) * (ETOP average value for ETOPperiod)) >= (ETOPtotal)
// so.... filter will be iGoShortETOPtest >= iGoShortETOPtotal
// - this section all good to use
private int iGoShortETOPperiod = 5;
[Description("[SHORT Enter] Period Length for ETOP - Minimum 5")]
[GridCategory("[SHORT Enter]eTOP)"]
[Gui.Design.DisplayName ("1.a Period Length for ETOP to GO SHORT")]
public int GoShortETOPperiod
{
get { return iGoShortETOPperiod; }
set { iGoShortETOPperiod = Math.Max(3, value); }
}
private double iGoShortETOPtotal = 0.5;
[Description("[SHORT Enter] TOTAL value for ETOP - Minimum -.5")]
[GridCategory("[SHORT Enter]eTOP)"]
[Gui.Design.DisplayName ("1.b TOTAL value for ETOP to GO SHORT")]
public double GoShortETOPtotal
{
get { return iGoShortETOPtotal; }
set { iGoShortETOPtotal = Math.Max(0.5, value); }
}
private int iGoShortETOPbars = 3;
[Description("[SHORT Enter] #Bars for ETOP - Minimum 3")]
[GridCategory("[SHORT Enter]eTOP)"]
[Gui.Design.DisplayName ("1.c #Bars maximum totaled for ETOP to GO SHORT")]
public int GoShortETOPbars
{
get { return iGoShortETOPbars; }
set { iGoShortETOPbars = Math.Max(3, value); }
}
// --------------------------
//This is the part where my brain is too confused to resolve correctly, and really && annoying me greatly ...
//(btw, 4 decimal places expected in ETOP output) ..
//dataseries setup? double?? OnBarUpdate or OnStartUp ??
// VERY explicit code assist is really needed .. is there more than 1 right answer?
iGoShortETOPtest = (iGoShortETOPbars * (ETOP(iGoShortETOPperiod)[0]))
Thanks mightly for assist!
TJ

Comment