using SignalsTest; public static class Confirmations { public static float GetTWSConfirmation(List reports, int i) { float TWSHeightIncrement = 0; if (i > 22) { bool hasCrossedST = false; bool hasCrossedMA = false; for (int z = 0; z < 20; z++) { if (!reports[i - z].STUp && reports[i].STUp) { hasCrossedST = true; } if (reports[i - z].SMA20 < reports[i - z].Open && reports[i].SMA20 > reports[i].Open) { hasCrossedMA = true; } } if (hasCrossedMA) TWSHeightIncrement += 15; if (hasCrossedST) TWSHeightIncrement += 15; } return TWSHeightIncrement; } public static float GetTBCConfirmation(List reports, int i) { float HeightIncrement = 0; if (i > 22) { bool hasCrossedST = false; bool hasCrossedMA = false; for (int z = 0; z < 20; z++) { if (reports[i - z].STUp && !reports[i].STUp) { hasCrossedST = true; } if (reports[i - z].SMA20 > reports[i - z].Open && reports[i].SMA20 < reports[i].Open) { hasCrossedMA = true; } } if (hasCrossedMA) HeightIncrement += 15; if (hasCrossedST) HeightIncrement += 15; } return HeightIncrement; } }