Trying to add a multi time frame to the if statement:
Initially : if ((Close[2] > Close[1]) && (Close[0] > Close[1])) // this is intra day
changed it to this : if ((Close[2] > Close[1]) && (Close[0] > Close[1]) && (BarsArray[1][4] Close[1]) && (BarsArray[1][4]