Minor bug in SqHighest/SqLowest/SqHighestIndex/SqLowestIndex.mq4

Author: Krit

November 21st, 2019

Rating:
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

SqHighest.mq4:

void OnInit() {

switch(InpPrice){
case PRICE_OPEN:
case PRICE_HIGH:
case PRICE_LOW:
case PRICE_CLOSE:
case PRICE_MEDIAN:
case PRICE_TYPICAL:
case PRICE_WEIGHTED:
mode = InpPrice;
break;
default:
printf(“Incorrect value for input variable InpPrice=%d. Indicator will use value PRICE_HIGH for calculations.”,InpPrice);
mode=PRICE_HIGH;  // instead of 14;
}

SqLowest.mq4:

void OnInit() {

switch(InpPrice){
case PRICE_OPEN:
case PRICE_HIGH:
case PRICE_LOW:
case PRICE_CLOSE:
case PRICE_MEDIAN:
case PRICE_TYPICAL:
case PRICE_WEIGHTED:
mode = InpPrice;
break;
default:
printf(“Incorrect value for input variable InpPrice=%d. Indicator will use value PRICE_LOW  for calculations.”,InpPrice);

// instead of PRICE_HIGH;

mode=PRICE_LOW;  // instead of 14;
}

 

Same for SqHighestIndex/SqLowestIndex.mq4

Leave a Reply

Please Login to comment