This is a modified version of @SeaSide420 TSI CCI Hull with profits exit on long and short order with alert as well original script : the strategy script: /// feel free to edit/improve and comment