mercredi 23 octobre 2019

How to test more than one variable in an if statement?

I am trying to test more than one variable in an if statement.

double firstPlot = RMMA(MultiMA1types.VWMA, 2, 160, 10, 2, 128, 0.75, 0.5).Values[15][0];
double secondPlot = RMMA(MultiMA1types.VWMA, 2, 160, 10, 2, 128, 0.75, 0.5).Values[14][0];

In fact their will be more than one variable: thirdPlot fourthPlot …

if(firstPlot < highPrice && firstPlot > lowPrice)

Is it possible to test each variable in one shot inside the if statement without having to repeat the if statement the same number of times as the number of variables? Like creating one variable that will gather all Plot and be tested all at the same time separately inside the if statement?

Thank you

Aucun commentaire:

Enregistrer un commentaire