Topic: Math.Min ,max question
if Today’s low is lower than the previous 15 lows then buy
what is the mistake
public override void Calculate(SlotTypes slotType)
{
// Reading the parameters
int iFirstBar = 16;
double[] adUp = new double[Bars];
double[] adDn = new double[Bars];
for (int iBar = 16; iBar < Bars - 1; iBar++)
{
// Long trade
//1. Today’s low is lower than the previous 15 lows.
if (Low[iBar - 15] < Math.Min(Low[iBar - 1], Low[iBar - 15]))
adUp[iBar] = 1;
Thanks in advance