Since @Hypoluxa 's strategy is set for 10m, I locked it to 10m charts. If you want to use the script on different timeframes, remove the following 2 lines.barbaros, very nice. I noticed the study only works on the 10 minute chart. How do I code it to allow for it to work on all time frames? Thanks!
Python:
# Check for 10min chart
Assert(GetAggregationPeriod() == AggregationPeriod.TEN_MIN, "Incorrect Chart Time, use 10m");