# High - middel - low / value

**URL:** https://forum.xod.io/t/high-middel-low-value/4511
**Category:** Uncategorized
**Created:** [October 13, 2020, 1:03pm UTC](https://forum.xod.io/t/high-middel-low-value/4511 "2020-10-13T13:03:25Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)
#### Post date: [October 13, 2020, 2:59pm UTC](https://forum.xod.io/t/high-middel-low-value/4511/2 "2020-10-13T14:59:16Z")

</div>

One option would be to use the min-buffer or min-buf-code from another discussion ([How to write code to place timer values in order from low to high](https://forum.xod.io/t/how-to-write-code-to-place-timer-values-in-order-from-low-to-high/4454/14)) to sort the values for you, then just pull the middle value.

Using min-buff-code, you probably want to RST all the buffers, then push 3 values on (flip-n-times is probably the easiest way to do that), then read the value from the middle buffer.

![image](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/d/d0101bf95be372a9a8faf53deff44d800c38c777.png)  
Since this code assumes you only run once on boot, RST of buffers is not really needed (but would be needed if sequence gets repeated later).  
When flip-n-times-ACT changes to FALSE, you are ready to read your middle value.

---

_[View the full topic](https://forum.xod.io/t/high-middel-low-value/4511)._
