I'm trying to design a 2 up, 1 down indicator for a peak but its not working. Could any help me??? thanks in advance. Theres no error code just that the lines won't plot.
protected override void OnBarUpdate() { // Use this method for calculating your indicator values. Assign a value to each // plot below by replacing 'Close[0]' with your own formula. if (CurrentBar < 5) {return;} bool PeakConditionOne = Close[1] > Close[0]; bool PeakConditionTwo = Close[2] < Close[1]; bool PeakConditionThree = Close[3] < Close[1]; if (PeakConditionOne == true && PeakConditionTwo == true && PeakConditionThree == true) { int i = 0; for (i = 0; i < 4; i++) { INDLINE.Set(Close[i]); } } }
Comment