# Feature Request: xPower

**URL:** <https://forum.intervals.icu/t/feature-request-xpower/1245>\
**Category:** Feature Requests\
**Created:** [27 June 2020 17:18 UTC](https://forum.intervals.icu/t/feature-request-xpower/1245 "2020-06-27T17:18:21Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Justin\_Wang](https://forum.intervals.icu/user_avatar/forum.intervals.icu/justin_wang/32/52698_2.png) [@Justin\_Wang](https://forum.intervals.icu/u/Justin_Wang)\
**Post date:** [15 June 2025 23:09 UTC](https://forum.intervals.icu/t/feature-request-xpower/1245/6 "2025-06-15T23:09:47Z")

</div>

I’ve had a crack and posted the scripts here

> {  
> watts = streams. Get(“fixed\_watts”).data  
> w25 = icu.stats.calcMovingAvg(watts, 25)  
> tss = 0  
> for (let i = 0; i \< w25.length; i++) {  
> w = (w25[i]/icu.sportSettings.ftp)\*\*2;  
> tss += w  
> }  
> tss = tss/36  
> //activity.icu\_training\_load = tss  
> }

> [@xGAP and xPower](https://forum.intervals.icu/t/xgap-and-xpower/106020):
>
> In the vein of [this thread](https://forum.intervals.icu/t/feature-request-xpower/1245/3) and [this blog post](https://science4performance.com/tag/xpower/), I had a crack at creating a script for a custom activity stream for xPower and xGAP. Please note I do not know how to code, and tried to teach myself with copilot, VSC and the resources on this forum. xPower { let watts = icu.streams.fixed\_watts let w25 = icu.stats.calcCenteredMovingAvg(watts, 25) for (let i = 0; i \< data.length; i++) data[i] = Math.pow(Math.pow(w25[i], 4), 0.25) } xGAP { let gaStr = icu.streams.ga\_velocity let g25 =…

---

_[View the full topic](https://forum.intervals.icu/t/feature-request-xpower/1245)._
